-
Notifications
You must be signed in to change notification settings - Fork 12
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
[WIP] Size optimisations #32
Conversation
Cargo.toml
Outdated
@@ -14,3 +14,5 @@ members = [ | |||
|
|||
[profile.release] | |||
lto = true | |||
opt-level = 's' |
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.
If we're doing precompiles, size should not matter as much since my understanding is these system contracts will be stored locally. Gas costs are fixed for execution, might as well optimize for performance.
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.
Needs a step to install wasm-snip
and wasm-gc
This was my work in progress branch for testing various settings and compilers. Not meant to be merged anytime soon. |
d9020ab
to
21bdbbf
Compare
The
Basically snip/gc cannot remove those debugging sections. The identity is 97250 bytes long. Out of that debug sections sum to 91212 bytes and the names section (only needed for debugging) is 829 bytes. 94.65% is debugging information. Properly stripping it will result in 5209 bytes for the identity. Still quite big, but not a monster as it is now. Stripping these sections is where wasmx/wasm-chisel#48 will be useful. 50% of the remaining code is |
Use wasm-snip and wasm-gc
21bdbbf
to
d6bd51e
Compare
This is mostly obsolete now. |
Use wasm-snip and wasm-gc