-
Notifications
You must be signed in to change notification settings - Fork 291
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
wasmi_v1: improve instruction scheduler #376
Conversation
Codecov Report
@@ Coverage Diff @@
## master #376 +/- ##
==========================================
- Coverage 79.39% 79.31% -0.08%
==========================================
Files 97 98 +1
Lines 11187 11197 +10
==========================================
- Hits 8882 8881 -1
- Misses 2305 2316 +11
Continue to review full report at Codecov.
|
This is used in the interpreter hot path and results in roughly 5-15% performance improvement across the board for nearly all execution benchmarks.
This shows performance improvements for most benchmarks in the range of 10-20%!
3aaff64
to
20867a6
Compare
Note that this PR also fixes this |
This PR changes the instruction scheduler of the
wasmi_v1
engine.The new approach seems promising and also is less affected by the performance regressions with newer
rustc
versions than the current interpreter instruction scheduler.Note that the instruction scheduler is on the absolute hot path of the interpreter which is why we see significant changes in performance.
We compare the performance of Rust 1.59 because that is the last version before the performance regressions and we also use Rust 1.62 because it is the current stable Rust version.
Rust 1.59
tiny_keccak
rev_complement
regex_redux
count_until
factorial_recursive
factorial_optimized
recursive_ok
recursive_trap
host_calls
fib_recursive
Rust 1.62 (Stable)
tiny_keccak
rev_complement
regex_redux
count_until
factorial_recursive
factorial_optimized
recursive_ok
recursive_trap
host_calls
fib_recursive
Conclusion
All in all a significant improvement across the board. However, even the new instruction scheduler still suffers a performance degradation of roughly 15-20% with a newer
rustc
version compared to Rust 1.59.