`wasm-opt -Oz` takes an inordinate amount of time
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- wasm
- Domain
- compilers, performance
Research direction
Start by reproducing the issue through the wasm-opt entry point using the reported optimization levels and enabled features; the test binary is not included in this issue. Compare parallelism and runtime for -Os and -Oz against -O1 and -O2, then verify that any change improves optimization time without losing the reported size results.
Written by the indexing model from the issue text.
Description
Firstly: yay, thank you for fixing the control-flow values issue in the parser! Binaryen can now work on Hoot's binaries. Thank you thank you!
I noticed a performance bug that you may be interested in, for -Oz.
| optimization level | bytes | real time | user time |
|---|---|---|---|
| original | 5485027 | - | - |
-O0 |
5835468 | 0.74s | 1.18s |
-O1 |
4810648 | 2.96s | 65s |
-O2 |
4664753 | 5.34s | 104s |
-Os |
4378817 | 806s | 1081s |
-Oz |
4278988 | 804s | 1103s |
This is a 32-logical-cpu system. As you can see, -Os / -Oz don't parallelize very well, and takes a bit too long to get useful results.
I can provide the test file, should that be of interest, though github doesn't seem to want to attach it. Enabled features are --enable-bulk-memory --enable-multivalue --enable-reference-types --enable-gc --enable-tail-call --enable-exception-handling.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 70
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WebAssembly/binaryen
-
Difficulty 2/5 Half a day Newbie friendliness 76/100
WebAssembly/binaryen#9018 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
WebAssembly/binaryen#9123 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WebAssembly/binaryen#9122 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
WebAssembly/binaryen#9086 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
WebAssembly/binaryen#9038 · 5 comments ·
All issues in WebAssembly/binaryen
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
objectionary/jeo-maven-plugin#1774 ·
-
compiler/runtime
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bot-triaged module: correctness (silent) module: fx release triage triage review
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Grammar Gap: activated › effect clause › {self} deals damage equal to its power to target creature Openarea:mechanics ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
fil-donadoni/tolaria#4317 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#8869 · 1 comment ·