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: Support arg0 splat on invokeblock #7234

Merged
merged 1 commit into from Feb 6, 2023

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Feb 3, 2023

Similar to #7233, iseq_arg0_splat is now the largest exit reason (95.2% of invokeblock exit reasons) when you rewrite Array#each in Ruby. This PR fixes that for the most common case.

railsbench stats

Even without Array#each in Ruby, it does seem to show a small improvement in the number of side exits: (using run_once.sh)

before

invokeblock exit reasons:
    iseq_arg0_splat       2000 (51.7%)
               proc       1112 (28.7%)
             symbol        759 (19.6%)

after

invokeblock exit reasons:
      proc       1112 (59.4%)
    symbol        759 (40.6%)

@k0kubun k0kubun force-pushed the yjit-arg0-splat branch 9 times, most recently from 7c0bd09 to 47116e6 Compare February 4, 2023 01:16
@k0kubun k0kubun marked this pull request as ready for review February 4, 2023 02:01
@matzbot matzbot requested a review from a team February 4, 2023 02:01
@maximecb maximecb merged commit c30602e into ruby:master Feb 6, 2023
@maximecb maximecb deleted the yjit-arg0-splat branch February 6, 2023 21:12
k0kubun added a commit that referenced this pull request Feb 14, 2023
I added `invokeblock_iseq_arg0_args_splat` counter but it wasn't used
because of a typo.

Related to #7234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants