Ben Fritz wrote:

> On Wednesday, October 9, 2013 10:09:05 AM UTC-5, Julian Taylor wrote:
> > 
> > Is easytag just doing the highlight regex wrong or is this a issue in the 
> > new engine?
> > 
> > the regex used looks like this:
> > 
> > syntax match cFunctionTag 
> > /\C\<\%(cpl_column_get_mean_complex\|cx_tree_previous\|cpl_table_copy_data_int\|cpl_table_get_column_format\|cx_map_erase_range\|cpl_table_divide_columns
> >  ....
> > 
> > 
> 
> I think this is a perfect example of a case where the old regex engine
> SHOULD do better. In this case, you have a bunch of literal matches
> with very little if any backtracking, and the number of possible
> matches is so large that there will be many many states added in the
> new engine, none of which will normally match.
> 
> Bram, are you still planning on making the automatic selection of
> regex engine based on which one is probably going to be faster? This
> might be a good first type of pattern to trigger selection of the old
> engine.

Well, that's going to be a bit difficult if the problem is that the new
engine uses more memory, going over a limit that causes swapping.
Suppose you do the same on a machine with sufficient RAM, which engine
is faster?

Over time Vim has grown in its memory footprint, because it's often
useful and machines have more memory these days.  And RAM is cheap.

It's true that the states of the new engine take quite a bit of memory.
Main cause is to be able to support all the regexp features that Vim
as.  It might be possible to reduce it a bit, but it's not easy to do
this.

-- 
A mathematician is a device for turning coffee into theorems.
                                        Paul Erdos
A computer programmer is a device for turning coffee into bugs.
                                        Bram Moolenaar

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui