CosmWasm / CosmWasm/optimizer

wasm-opt flags -Os vs. -Oz

Open
#95 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
145
Forks
68
PR merge metrics
No merged PRs in 30d

Description

Locally I'm testing the two optimization modes with wasm-opt version 110:

```
$ wasm-opt --help

-Os execute default optimization
passes, focusing on code size

-Oz execute default optimization
passes, super-focusing on code
size

```

For my tests, there is a difference in the order of magnitute of 1-2%:

```
# -Os

-rwxr-xr-x 1 me staff 192130 16 Okt 17:27 nois_demo.wasm
-rwxr-xr-x 1 me staff 480903 16 Okt 17:27 nois_oracle.wasm
-rwxr-xr-x 1 me staff 225705 16 Okt 17:27 nois_proxy.wasm

# -Oz

-rwxr-xr-x 1 me staff 189263 16 Okt 17:29 nois_demo.wasm
-rwxr-xr-x 1 me staff 472586 16 Okt 17:29 nois_oracle.wasm
-rwxr-xr-x 1 me staff 223632 16 Okt 17:29 nois_proxy.wasm
```

So for now I don't see a strong need to move away from the well established `-Os`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.