Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby: Faster matching #2354

Merged
merged 1 commit into from May 18, 2020
Merged

Conversation

RunDevelopment
Copy link
Member

This combines a few greedy patterns for better performance.

Found 1 cases with 3 files in total.
Test 2 candidates with Prism.tokenize
Estimated duration: 0m 18s

------------------------------------------------------------

ruby

  https://raw.githubusercontent.com/rails/rails/master/actionview/lib/action_view/base.rb (12 kB)
  | local              0.49ms ±  1%   51smp      
  | PrismJS@master     0.59ms ±  1%   53smp 1.21x
  https://raw.githubusercontent.com/rails/rails/master/actionview/lib/action_view/layouts.rb (16 kB)
  | local              0.60ms ±  0%   52smp      
  | PrismJS@master     0.74ms ±  0%   51smp 1.22x
  https://raw.githubusercontent.com/rails/rails/master/actionview/lib/action_view/template.rb (14 kB)
  | local              0.79ms ±  1%   52smp      
  | PrismJS@master     1.04ms ±  0%   53smp 1.31x

------------------------------------------------------------

summary
                  best  worst  relative
  local              3      0     1.00x
  PrismJS@master     0      3     1.25x

@RunDevelopment RunDevelopment merged commit b526e8c into PrismJS:master May 18, 2020
@RunDevelopment RunDevelopment deleted the faster-ruby branch May 18, 2020 23:52
quentinvernot pushed a commit to TankerHQ/prismjs that referenced this pull request Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant