-
Notifications
You must be signed in to change notification settings - Fork 966
perf: interpreter improvements #2760
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
Conversation
It's more accessed than host, and when calling a function that takes interpreter as the first argument, no registers have to change.
This function massively bloats all callsites because it can drop the previous action.
We want to write directly into the maybe-uninitialized memory of the stack. We cannot do this using existing APIs, so we must add `push_slice` to `StackTr`.
CodSpeed Performance ReportMerging #2760 will improve performances by 33.39%Comparing Summary
Benchmarks breakdown
|
Reintroduce bluealloy#1361.
|
das feuer bruder |
mattsse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 all of this checks out afaict
The compiler does not elide the "not Some" check after inlining `popn_top`. See rust-lang/rust#144329.
Move runtime checks to debug mode only.
|
Awesome finds! It looks that the biggest thing is marking it is unfortunate that degradation didn't happened on PR when this fn was introduced but in EOF removal PR where code was removed, I guess with code removed the compiler switched its strategy for this fn from not inlining to inlining. |
Various interpreter improvements. See individual commits.