You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good question! Here's some tests. test.wasm is the "stock" walloc as built by "make test" with clang from mid-september, built with -Oz. The different optimization levels below are the levels passed to walloc-opt.
-rw-rw-r-- 1 wingo wingo 1810 Oct 19 10:10 test-O0.wasm
-rw-rw-r-- 1 wingo wingo 1681 Oct 19 10:10 test-O1.wasm
-rw-rw-r-- 1 wingo wingo 1660 Oct 19 10:10 test-O2.wasm
-rw-rw-r-- 1 wingo wingo 1648 Oct 19 10:10 test-O3.wasm
-rw-rw-r-- 1 wingo wingo 1662 Oct 19 10:10 test-O4.wasm
-rw-rw-r-- 1 wingo wingo 1647 Oct 19 10:10 test-Os.wasm
-rw-rw-r-- 1 wingo wingo 1647 Oct 19 10:10 test-O.wasm
-rw-rw-r-- 1 wingo wingo 1647 Oct 19 10:10 test-Oz.wasm
-rwxrwxr-x 1 wingo wingo 2023 Oct 13 14:36 test.wasm
So wasm-opt makes a binary that is 81% the size of the original. Not bad!
This is very cool!
I'm curious, does it get any smaller with
wasm-opt -O2
applied?The text was updated successfully, but these errors were encountered: