-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
refactor(parser): remove TokenValue::BigInt
from Token
#1924
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
This comment was marked as resolved.
This comment was marked as resolved.
CodSpeed Performance ReportMerging #1924 will not alter performanceComparing Summary
|
ef1143c
to
ae5f337
Compare
ae5f337
to
23d8767
Compare
Very nice performance gain! I assume that's due to reduced size of However... I don't think To explain my thinking...
This is different to Bumpalo's So you could fix the memory leak by adding a The fact that it doesn't do this is I think a significant factor in why OXC is so fast, and I had assumed The only viable solution I can see to the memory leak, which preserves OXC's speed, is to replace Therefore, I don't think the change from All the (very significant) gain in this PR is due to the other change - removing Or am I misunderstanding? |
By the way, if just removing |
I copied the arena implementation from jsparagus https://github.com/mozilla-spidermonkey/jsparagus/blob/master/crates/ast/src/arena.rs We'll have to experiment with the drop problem. oxc is being integrated into Rolldown (an incremental compiler), we are going to get into real trouble if memory leaks 💥 You're right about |
d9a662f
to
6f8a72d
Compare
6f8a72d
to
dad94f7
Compare
TokenValue::BigInt
from Token
This PR partially fixes oxc-project#1803 and is part of oxc-project#1880. BigInt is removed from the `Token` value, so that the token size can be reduced once we removed all the variants. `Token` is now also `Copy`, which removes all the `clone` and `drop` calls. This yields 5% performance improvement for the parser.
This PR partially fixes #1803 and is part of #1880.
BigInt is removed from the
Token
value, so that the token size can bereduced once we removed all the variants.
Token
is now alsoCopy
, which removes all theclone
anddrop
calls.This yields 5% performance improvement for the parser.