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

Performance degradation between 1.7 and 1.9 #1105

Open
hurricup opened this issue Aug 29, 2023 · 0 comments
Open

Performance degradation between 1.7 and 1.9 #1105

hurricup opened this issue Aug 29, 2023 · 0 comments

Comments

@hurricup
Copy link

We have a erb language lexer. Syntax if very simple: https://github.com/ruby/erb

Most of the rules in lexer are upto matches and some dangerously looking negations:

START_LEXEME = "<%" | "<%#" | "<%="   // this is ued for upto as `~{START_LEXEME}`
BEFORE_START_LEXEME = !({ANY_CHAR}* {START_LEXEME} {ANY_CHAR}*)

And seems that they both worked perfectly up to 1.7 (lexer speed was about 170 mb/sec.
But after 1.9 lexer speed went down to 0.03 mb/sec.

I really don't like the last rule, looks like it matches everything for each check. But I'm not quite sure (it worked somehow before).

Could you please clarify what went wrong here?
Thank you.

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

No branches or pull requests

1 participant