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
{{ message }}
Repository navigation
The reference interpreter became up to 20 times slower after a87fffc #1979
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:
Thanks for the report. I was able to narrow the regression down to a bugfix in the substitution function. Previously, it cut off at deftypes, assuming they are closed, but that wasn't a sound assumption. Now it naively applies transitively. That didn't make a notable difference on the test suite, but shows for modules with long chains of rectypes.
I'll try to find some optimisation that doesn't interfere too much with the executable-spec style of the interpreter, but I don't know if that's gonna be easy. Simple memoisation didn't help.
Activity
rossberg commentedon Sep 21, 2025
Thanks for the report. I was able to narrow the regression down to a bugfix in the substitution function. Previously, it cut off at deftypes, assuming they are closed, but that wasn't a sound assumption. Now it naively applies transitively. That didn't make a notable difference on the test suite, but shows for modules with long chains of rectypes.
I'll try to find some optimisation that doesn't interfere too much with the executable-spec style of the interpreter, but I don't know if that's gonna be easy. Simple memoisation didn't help.