Skip to content
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

Optimizing for code size by default may hurt performance severely #27

Open
alexcrichton opened this issue Nov 1, 2018 · 0 comments
Open

Comments

@alexcrichton
Copy link
Contributor

A topic that recently came up in #wg-wasm on Discord was that a wasm-pack project was performance much more slowly than a raw rustc-generated wasm file. It turned out to be related to opt-level = 's' in Cargo.toml, causing a nearly 3x (!) slowdown compared to -C opt-level=3 (the default).

I'm not sure how often this comes up in the wild though. Unfortunately there's not really a silver bullet here :(. I figured it'd be good to catalog though!

pastelmind pushed a commit to webtoon/psd that referenced this issue Jun 16, 2022
This option is supposed to make the output WASM smaller, but it actually
makes the bundle slightly bigger by ~200 bytes.

Also, this flag may cause performance issues according to reports
(although we personally didn't experience any):
rustwasm/wasm-pack-template#27
pastelmind pushed a commit to webtoon/psd that referenced this issue Jun 17, 2022
This option is supposed to make the output WASM smaller, but it actually
makes the bundle slightly bigger by ~200 bytes.

Also, this flag may cause performance issues according to reports
(although we personally didn't experience any):
rustwasm/wasm-pack-template#27
alexspevak pushed a commit to opendesigndev/psd-ts that referenced this issue Jan 16, 2023
This option is supposed to make the output WASM smaller, but it actually
makes the bundle slightly bigger by ~200 bytes.

Also, this flag may cause performance issues according to reports
(although we personally didn't experience any):
rustwasm/wasm-pack-template#27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant