-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
perf(parser): eat whitespace after line break #2353
perf(parser): eat whitespace after line break #2353
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
eb7db91
to
a3d4ea3
Compare
CodSpeed Performance ReportMerging #2353 will improve performances by 27.35%Comparing Summary
Benchmarks breakdown
|
5b9f1a7
to
070d3c4
Compare
a3d4ea3
to
d89b376
Compare
070d3c4
to
9a8d7b7
Compare
I LOVE all the performance improvements. One nitpick is the amount of macros we are introducing, it may impact compilation speed and hinder other contributors to navigate the code. It's troublesome but I think we can expand all the code once we are done ... just like how I did it with the visitors https://github.com/oxc-project/oxc/blob/main/crates/oxc_ast/src/visit.rs ... I wrote it manually 😅 |
It's been fun! By our joint efforts, over the past month the Maybe you can update the website where it says "2x faster than SWC" to "3x faster"! It's funny, originally I had it all written out by hand, but it was so repetitive I found it hard to follow, so that's why I brought in the macro. Have you noticed a difference in compilation times? I haven't noticed one, but OXC compilation falls into the "fast enough" category for me, especially after working on SWC which was so hideously slow in that department. |
https://github.com/oxc-project/bench-javascript-parser-written-in-rust will automatically pick up the latest release via renovate bot, and I'll update the numbers from that benchmark. |
We'll need to look at |
Would you be willing to cut a release at this point? I think the speed boost in parser justifies it, and I'm dying to see the updated comparison to SWC. |
Uses the `byte_search!` macro introduced in oxc-project#2352 to consume whitespace after a line break.
Uses the
byte_search!
macro introduced in #2352 to consume whitespace after a line break.