Skip to content

Add send_rubyfunc_inline benchmark#522

Open
k0kubun wants to merge 2 commits into
ruby:mainfrom
k0kubun:send-rubyfunc-inline-benchmark
Open

Add send_rubyfunc_inline benchmark#522
k0kubun wants to merge 2 commits into
ruby:mainfrom
k0kubun:send-rubyfunc-inline-benchmark

Conversation

@k0kubun

@k0kubun k0kubun commented Jul 6, 2026

Copy link
Copy Markdown
Member

This is a microbenchmark to evaluate ZJIT's PushInlineFrame.

stack map

ruby/ruby#17387 speeds up this benchmark:

before: ruby 4.1.0dev (2026-07-06T20:37:20Z origin/master 733a9df661) +ZJIT +PRISM [x86_64-linux]
after: ruby 4.1.0dev (2026-07-06T21:08:10Z zjit-inline-push f6dfa684fc) +ZJIT +PRISM [x86_64-linux]

--------------------  -----------  -----------  -------------  ------------
bench                 before (ms)   after (ms)  after 1st itr  before/after
send_rubyfunc_inline  36.7 ± 0.8%  34.6 ± 1.9%          1.035         1.059
--------------------  -----------  -----------  -------------  ------------

interpreter vs YJIT vs ZJIT

interp: ruby 4.1.0dev (2026-07-06T21:08:10Z zjit-inline-push f6dfa684fc) +PRISM [x86_64-linux]
yjit: ruby 4.1.0dev (2026-07-06T21:08:10Z zjit-inline-push f6dfa684fc) +YJIT +PRISM [x86_64-linux]
zjit: ruby 4.1.0dev (2026-07-06T21:08:10Z zjit-inline-push f6dfa684fc) +ZJIT +PRISM [x86_64-linux]

--------------------  ------------  -----------  -----------  ------------  ------------  -----------  -----------
bench                  interp (ms)    yjit (ms)    zjit (ms)  yjit 1st itr  zjit 1st itr  interp/yjit  interp/zjit
send_rubyfunc_inline  447.2 ± 0.8%  46.3 ± 0.8%  34.6 ± 1.0%         9.438        12.584        9.655       12.935
--------------------  ------------  -----------  -----------  ------------  ------------  -----------  -----------

@k0kubun k0kubun requested a review from a team July 6, 2026 22:48
@k0kubun

k0kubun commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

The ruby-head CI failure seems unrelated. I'll address that in a separate PR.

Comment thread benchmarks/send_rubyfunc_inline.rb Outdated
Comment thread benchmarks/send_rubyfunc_inline.rb
@tekknolagi

Copy link
Copy Markdown
Contributor

Is the interp/YJIT/ZJIT before or after the PR you mentioned that speeds us up?

@k0kubun

k0kubun commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

after. I generally include the branch name and sha (2026-07-06T21:08:10Z zjit-inline-push f6dfa684fc) when I paste ruby-bench results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants