Skip to content

Instantly share code, notes, and snippets.

@shirosaki
Last active December 18, 2015 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirosaki/5726164 to your computer and use it in GitHub Desktop.
Save shirosaki/5726164 to your computer and use it in GitHub Desktop.

Syntax performance on Vim 7.3.1136 Ubuntu Linux

Open a file of filetype=eruby

Then:

:syntime on
Ctrl-L
:syntime report

:set regexpengine=0

  TOTAL      COUNT  MATCH   SLOWEST     AVERAGE   NAME               PATTERN
  0.057429   40     4       0.002890    0.001436  rubyPredefinedConstant \%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_VERSION\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!
  0.052782   36     0       0.002834    0.001466  rubyPredefinedConstant \%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\|RUBY_PLATFORM\|RUBY_RELEASE_DATE\)\>\%(\s*(\)\@!
  0.034950   36     0       0.001480    0.000971  rubySymbol         []})\"':]\@<!\h\w*[!?]\=:\s\@=
  0.032881   36     0       0.001623    0.000913  rubyPredefinedConstant \%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!
  0.012739   36     0       0.000549    0.000354  rubySymbol         \%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!
  0.004343   162    126     0.000050    0.000027  rubySymbol         []})\"':]\@<!:\h\w*\%([?!=]>\@!\)\=

:set regexpengine=1

  TOTAL      COUNT  MATCH   SLOWEST     AVERAGE   NAME               PATTERN
  0.002823   40     4       0.000231    0.000071  rubyPredefinedConstant \%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_VERSION\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!
  0.002476   36     0       0.000124    0.000069  rubySymbol         []})\"':]\@<!\h\w*[!?]\=:\s\@=
  0.002473   36     0       0.000201    0.000069  rubyPredefinedConstant \%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\|RUBY_PLATFORM\|RUBY_RELEASE_DATE\)\>\%(\s*(\)\@!
  0.002256   36     0       0.000107    0.000063  rubySymbol         \%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!
  0.002140   36     0       0.000171    0.000059  rubyPredefinedConstant \%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!
  0.001292   162    126     0.000021    0.000008  rubySymbol         []})\"':]\@<!:\h\w*\%([?!=]>\@!\)\=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment