Skip to content
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

Add RETURN_SELF and optimize the DUP, POP_X, POP sequences #45

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

smarr
Copy link
Member

@smarr smarr commented Aug 6, 2024

The main motivation for this PR is to simplify bytecode sequences, remove a bit of cruft, to make it easier to recognize setters as trivial methods.

Though, this also gives a bit of a performance benefit, especially on micro benchmarks.
The PR also adds more of the unusual infrastructure we have to deal with bytecodes.

https://rebench.dev/SOMpp/compare/dc902fb54bd693ccc02f3cbd4f1cedc2ae802649..e33d58323d14ab2e3f5befc7c37218df9c3cbab1

Run time: median -1% (min. -46%, max. 14%)

smarr added 2 commits August 6, 2024 14:25
Combines PUSH_SELF+RETURN_LOCAL into a single bytecode, and sometime omits POP.

Signed-off-by: Stefan Marr <[email protected]>
@smarr smarr merged commit f2e87f8 into SOM-st:master Aug 6, 2024
18 checks passed
@smarr smarr deleted the optimize-bytecodes branch August 6, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant