-
-
Notifications
You must be signed in to change notification settings - Fork 23.6k
Optimized shrink options to binaryen wasm-opt pass #97457
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: master
Are you sure you want to change the base?
Conversation
|
Performance-wise and size-wise, how does it stack to the alternative PR? |
|
Performance wise, this shouldn't actually change anything ( I haven't verified with the same setup as previous and I may not have time to do an apples to apples comparison unfortunately). But this doesn't change any compiler and linker args. The only thing this changes is what optimization passes binaryen is running. This happens after The only optimization pass that isn't guarded by a shrink level AND and an optimization level is I ran with debug output to verify what optimization passes binaryen is actually running and can confirm it's a different set. In fact, you can even go to This saves about 5% of the wasm size for us. |
|
Are #97407 and this PR compatible? |
|
I would say they are mutually exclusive, and I wouldn't bother merging this PR if #97407 is merged because then this is just superfluous. #97407 passes That being said, this is probably the 'safer' of the two, as it shouldn't affect performance at all (compiler args are the same), and it does saves size. It may even increase performance, but I haven't had time to properly benchmark as we've just decided to run with it. |
|
Didn't test this PR but expect it will do as best as manual wasm-opt call (saved ~10% of space for some people) |
Alternative to #97407 which runs wasm-opt with maximum shrink-level (2) / Oz.