The reference interpreter became up to 20 times slower after a87fffc
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- wasm
- Domain
- compilers, performance
Research direction
Use the provided index.wasm and the shown wasm command as the reproduction entry point. Compare builds at a87fffc, d0eee4a, and d79e5c8, then profile or bisect the regression. Done means the reference interpreter no longer shows the reported slowdown while preserving the command's result, 1 : [i32].
Written by the indexing model from the issue text.
Description
While experimenting with the reference interpreter on binaries produced by Kotlin, I noticed a huge performance degradation.
It seems it is due to some changes introduced in a87fffc.
To reproduce it, please run a wasm file index.wasm.zip in reference interpreter with the following command:
'wasm' index.wasm -t -e '(module instance) (invoke "_initialize") (invoke "runBoxTest")'
Here are some runs with different versions:
$ time '_build/a8/wasm.exe' index.wasm -t -e '(module instance) (invoke "_initialize") (invoke "runBoxTest")'
-- Running ("(input \"index.wasm\")")...
-- Parsing...
-- Running...
-- Loading (index.wasm)...
-- Decoding...
-- Running...
-- Decoding...
-- Checking...
-- Running ("(module instance) (invoke \"_initialize\") (invoke \"runBoxTest\")")...
-- Parsing...
-- Running...
-- Initializing...
-- Invoking function "_initialize"...
-- Invoking function "runBoxTest"...
1 : [i32]
'a8/wasm.exe' -t -e 12.65s user 1.27s system 97% cpu 14.212 total
$ time '_build/d0/wasm.exe' index.wasm -t -e '(module instance) (invoke "_initialize") (invoke "runBoxTest")'
-- Running ("(input \"index.wasm\")")...
-- Parsing...
-- Running...
-- Loading (index.wasm)...
-- Decoding...
-- Running...
-- Decoding...
-- Checking...
-- Running ("(module instance) (invoke \"_initialize\") (invoke \"runBoxTest\")")...
-- Parsing...
-- Running...
-- Initializing...
-- Invoking function "_initialize"...
-- Invoking function "runBoxTest"...
1 : [i32]
'_build/d0/wasm.exe' -t -e 0.65s user 0.02s system 73% cpu 0.919 total
$ time '_build/d7/wasm.exe' index.wasm -t -e '(module instance) (invoke "_initialize") (invoke "runBoxTest")'
-- Running ("(input \"index.wasm\")")...
-- Parsing...
-- Running...
-- Loading (index.wasm)...
-- Decoding...
-- Running...
-- Decoding...
-- Checking...
-- Running ("(module instance) (invoke \"_initialize\") (invoke \"runBoxTest\")")...
-- Parsing...
-- Running...
-- Initializing...
-- Invoking function "_initialize"...
-- Invoking function "runBoxTest"...
1 : [i32]
'_build/d7/wasm.exe' -t -e 0.65s user 0.02s system 78% cpu 0.860 total
- Dominant language
- WebAssembly
- Stars
- 3.5k
- Forks
- 539
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 13
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/spec
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
WebAssembly/spec#2245 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
WebAssembly/spec#2235 · 9 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
WebAssembly/spec#2196 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
WebAssembly/spec#2155 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
WebAssembly/spec#2150 · 1 comment ·
All issues in WebAssembly/spec
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
JakeChampion/lang#10213 ·
-
bug language-server
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
purefunctor/purescript-iris#552 ·
-
enhancement good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bradcypert/plum#58 ·