On Fri, Jun 7, 2013 at 10:16 PM, Bram Moolenaar <[email protected]> wrote:
>
> Hiroshi Shirosaki wrote:
>
>> Moving cursor of filetype=eruby is also much slower with Vim 7.3.1136
>> regexpengine=0.
>>
>> Here is a result of syntime.
>>
>> https://gist.github.com/shirosaki/5726164
>
> The patterns are using \@<! an awful lot.  Please change these to
> include a byte limit, e.g. \@2<!.
>
> I just sent out patch 7.3.1137, that should make matching with
> collections a lot faster.
>

Thank you. I got a lot faster result.

Vim 7.3.1145 with this ruby syntax patch:
https://gist.github.com/shirosaki/5732603


:set re=0

TOTAL      COUNT  MATCH   SLOWEST     AVERAGE   NAME               PATTERN
  0.007928   56     0       0.000472    0.000142
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!
  0.007776   56     0       0.000567    0.000139
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!
  0.007152   56     0       0.000461    0.000128  rubySymbol
\%([{(,]\_s*\)\@20<=\l\w*[!?]\=::\@!
  0.007072   56     0       0.000416    0.000126
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!
  0.006424   83     54      0.000261    0.000077  rubyRegexp
\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=
  0.006084   56     0       0.000344    0.000109
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIP
TIO


:set re=1

TOTAL      COUNT  MATCH   SLOWEST     AVERAGE   NAME               PATTERN
  0.014020   53     0       0.001291    0.000265  rubySymbol
[]})\"':]\@1<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@=
  0.006893   53     0       0.000374    0.000130
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!
  0.006132   53     0       0.000322    0.000116
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!
  0.006079   53     0       0.000386    0.000115  rubySymbol
\%([{(,]\_s*\)\@20<=\l\w*[!?]\=::\@!
  0.005247   53     0       0.000285    0.000099
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!
  0.003625   53     0       0.000194    0.000068
rubyPredefinedConstant
\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIP
TIO

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