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

Significantly faster offset cache for parser translation with multibyte characters #2385

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

kddnewton
Copy link
Collaborator

Before:

ruby 3.4.0dev (2024-02-07T11:34:48Z master 9ebaf7a8ef) [arm64-darwin23]
Warming up --------------------------------------
 Parser::CurrentRuby     1.000 i/100ms
Prism::Translation::Parser
                         1.000 i/100ms
Calculating -------------------------------------
 Parser::CurrentRuby      1.203 (± 0.0%) i/s -      7.000 in   5.821395s
Prism::Translation::Parser
                          0.245 (± 0.0%) i/s -      2.000 in   8.219212s

Comparison:
 Parser::CurrentRuby:        1.2 i/s
Prism::Translation::Parser:        0.2 i/s - 4.91x  slower

after:

ruby 3.4.0dev (2024-02-07T11:34:48Z master 9ebaf7a8ef) [arm64-darwin23]
Warming up --------------------------------------
 Parser::CurrentRuby     1.000 i/100ms
Prism::Translation::Parser
                         1.000 i/100ms
Calculating -------------------------------------
 Parser::CurrentRuby      1.167 (± 0.0%) i/s -      6.000 in   5.140792s
Prism::Translation::Parser
                          2.224 (± 0.0%) i/s -     12.000 in   5.401231s

Comparison:
Prism::Translation::Parser:        2.2 i/s
 Parser::CurrentRuby:        1.2 i/s - 1.90x  slower

@kddnewton kddnewton changed the title Significantly faster offset cache for parser translation Significantly faster offset cache for parser translation with multibyte characters Feb 9, 2024
@kddnewton kddnewton merged commit 532c2ef into main Feb 9, 2024
55 checks passed
@kddnewton kddnewton deleted the offset-cache branch February 9, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant