-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace wasmparser-nostd
fork with upstream wasmparser
#1141
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1141 +/- ##
==========================================
- Coverage 81.57% 81.45% -0.13%
==========================================
Files 306 306
Lines 25271 25349 +78
==========================================
+ Hits 20616 20648 +32
- Misses 4655 4701 +46 ☔ View full report in Codecov by Sentry. |
The new WasmFeatures type requires a bit less stack space due to bitfield usage. Ideally we use our own bitfield based type but this is more work.
I just found one reason why it regressed: I benchmarked without setting the The biggest regression we see now is |
After improving translation benchmarks and updating tl;dr Conclusions
Tiny-KeccakSpidermonkeyERC-20 |
wasmparser-nostd
fork with upstream wasmparser
as dependencywasmparser-nostd
fork with upstream wasmparser
With v0.218.0:
v0.219.0:
|
I just found out that This will likely fix a workaround in Wasmi:
|
This allows us to avoid a nasty work around.
#1197 requires this change. |
With bytecodealliance/wasm-tools#1906 merged we can also merge this PR once |
Thread discussing the performance regressions in
wasmparser
:bytecodealliance/wasm-tools#1701
Unfortunately benchmarks conducted locally show significant performance regressions for Wasm validation:
We can see this clearly in the posted screenshot since
translate/tiny_keccak/checked/eager
regresses massively whiletranslate/tiny_keccak/unchecked/eager
only regresses by 3% which could be noise.The only difference between these two cases is that
translate/tiny_keccak/checked/eager
validates the Wasm viawasmparser
whiletranslate/tiny_keccak/unchecked/eager
skips Wasm validation and only translates the Wasm via Wasmi.The huge 48% performance regression for the
checked/lazy
test case indicates that Wasm validation has a much higher constant cost bump for validation of non-function bodies, too. OR it indicates that the setup of the function validators became a lot more expensive.Reproduce benchmarks locally:
main
branch:cargo bench --bench benches -- --save-baseline main
cargo bench --bench benches -- --baseline main