Yasuhiro Matsumoto wrote:

> OK, I'll do it.
> However I doubt that there are some cases that new regexp engine is
> slower than original. This change make be possible to work with html
> file syntax, but re=2 seems to be slower than re=1.

The NFA engine is known to be slower on simple patterns, but much faster
on complicated patterns.  Especially patterns with "*" or "\+" should be
faster, because the backtracking engine makes many attempts and retries,
while the NFA engine explores all possible solutions in parallel.

After tuning and fixing bugs I want to only use the NFA engine for
complicated patterns, then we should really see the advantage.
The line length also matters.

Of course we can't use the NFA engine for items it does not support,
thus a mix of "*" and any not supported item would result in falling
back to the (slow) old engine.


-- 
It is too bad that the speed of light hasn't kept pace with the
changes in CPU speed and network bandwidth. -- <[email protected]>

 /// 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