-
Notifications
You must be signed in to change notification settings - Fork 787
[Parser] Do not eagerly lex numbers #6544
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This stack of PRs brings us from being ~8% slower than the old parser to being ~30% faster 🎉 |
} | ||
return getIndex(); | ||
} | ||
size_t getPos() const { return index; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth renaming index
to pos
or vice versa?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we actually also have a getIndex
method that does the same thing. Now that they are the same, it would be good to clean this up. I'll take a look at it as a follow-up.
7c48a77
to
2cfb8a1
Compare
6bf227b
to
1c0f12e
Compare
2cfb8a1
to
fb535c3
Compare
dc21b29
to
17ec230
Compare
d6a6223
to
15d01ea
Compare
Lex integers and floats on demand to avoid wasted work. Remove `Token` completely now that all kinds of tokens are lexed on demand.
17ec230
to
f07ff79
Compare
Lex integers and floats on demand to avoid wasted work. Remove
Token
completely now that all kinds of tokens are lexed on demand.