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

YJIT: Add codegen for Integer methods #7665

Merged
merged 3 commits into from Apr 5, 2023
Merged

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Apr 5, 2023

Similar to #7645, this PR adds codegen to skip pushing a frame like equivalent opt_* insns for Integer#*, Integer#/, and Integer#[], which I found useful for optimizing Optcarrot while working on RJIT.

They don't seem to have a significant impact on headline benchmarks, but Integer#* and Integer#/ could be used by actual applications.

Benchmark

before: ruby 3.3.0dev (2023-04-05T16:57:32Z master 52e571fa72) +YJIT [x86_64-linux]
after: ruby 3.3.0dev (2023-04-05T17:28:51Z yjit-mul-div f31728275c) +YJIT [x86_64-linux]

---------  -----------  ----------  ----------  ----------  ------------  -------------
bench      before (ms)  stddev (%)  after (ms)  stddev (%)  before/after  after 1st itr
optcarrot  1737.8       0.7         1569.8      0.9         1.11          1.11
---------  -----------  ----------  ----------  ----------  ------------  -------------

@matzbot matzbot requested a review from a team April 5, 2023 17:39
@k0kubun k0kubun merged commit 1587494 into ruby:master Apr 5, 2023
98 checks passed
@k0kubun k0kubun deleted the yjit-mul-div branch April 5, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants