On Apr 3, 8:48 pm, James Vega <[EMAIL PROTECTED]> wrote:
> Based on previous discussions on the list, I don't think that's the
> intended behavior either.  I'm pretty sure the logic is "If NFA compiler
> worked, return that otherwise return the BT compiled regex."  This would
> translate to:
>
>   return prog ? prog : bt_regengine.regcomp(expr, re_flags);

Thanks James, I changed it, works fine now

Benchmark result using ext-js.vim (507 849 Bytes javascript file)

Try1:
Gvim.exe:  11.1533138743
Gvim-re.exe:  39.4426857432

Try2:
Gvim.exe:  10.8661471241
Gvim-re.exe:  39.3700461863

Gvim-re is the one using the regexp patch.

The benchmark script (in Python)

import os
from time import clock, sleep

clock()
os.system('gvim-re.exe -c "runtime plugin/tohtml.vim" -c "wq!" ext-
all.js')
t1 = clock()
os.system('gvim.exe -c "runtime plugin/tohtml.vim" -c "wq!" ext-
all.js')
t2 = clock()

# This is try2, for try1 I just swap those commands above
print "Gvim.exe: ", t2-t1
print "Gvim-re.exe: ", t1

Try3:
Gvim.exe:  10.9457255287
Gvim-re.exe:  39.4854167767

Try3 is just running gvim.exe -c "wq!" ext-all.js

---
Charles
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui