-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore(es/ast): Use opt-level = s for AST
#11209
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
base: main
Are you sure you want to change the base?
Conversation
|
|
Claude finished @kdy1's task —— View job PR Review: Use
|
Binary Sizes
Commit: e814015 |
CodSpeed Performance ReportMerging #11209 will degrade performances by 2.82%Comparing Summary
Benchmarks breakdown
|
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.
I think the perf regression caught by codspeed is all caused by wrong benchmarks.
I looked at the flamegraphs, and the only thing that slowed down is clone() (which exists just to run benchmark), which should not be profiled by those bencmarks
|
@kdy1 I think we'd better only set But I'm confused if it's worth to do so. Performance is also important. |
|
It does not apply to end-user binary. It’s just to align our performance benchmark with the one of binding. |
|
Actually I’d like to promote this configuration as recommended in the future, after verifying the numbers. |
|
@CPunisher For example, I could verify that our opt-level configuration does not affect performance badly by copying them to the root workspace. #11210 And next.js is using a very similar opt-level configuration. https://github.com/vercel/next.js/blob/89cd2058a6b2ff711a7237b0ba5003b73b4649c1/Cargo.toml#L48-L274 I'd like to promote this as a documentation, but to do it, we need to verify that it does not make the performance worse. |
|
I'm still not too clear about the pros. IMO there's two aspects that disrupted the benchmark, although it actually does nothing with the rust api users of swc:
|
|
For 1, do you mean this PR? I can fix the benchmarks to not benchmark clone() calls first. Then it will not create a fake point. For 2, I’m not sure if any rust user would look at the codspeed dashboard. It’s relative to previous commit, so typically it’s useful only for the main developers. |
|
But about pros, swc/core is also a product and we need a way to profile the performance of it |
How will you avoid
For example, we may find a optimization that makes parser 1% faster under |
This is a fair point, but I'm not going to slow down (opt-level = s) any crate where performance is important, and we need a way to profile the performance of |
Description:
swc_ecma_astonly contains code for serialization/deserialization and some trait implementations likeClone