You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
YJIT: Ruby 4.0 YJIT is slower than Ruby 3.4 YJIT on chunky-png, liquid-c, liquid-render, and mail #885
liquid-c, liquid-render, and mail benchmarks seem to show a significant regression in Ruby 4.0 YJIT. chunky-png also seems to be slower with Ruby 4.0 YJIT.
@jeremyevans mentioned this when I talked with him at SFRuby, and I didn't have a good explanation. We should investigate which change triggered this, and ideally, fix it before the Ruby 4.0 release.
This looks pretty bad. Given that the Ruby 3.4 results were very stable, the unstable results are probably not the benchmark or the benchmark server's fault, but Ruby 4.0 interpreter's.
So I think it's probably an interpreter regression, not YJIT's. Since speed.ruby-lang.org shows only Auguest-or-later results and rubybench.github.io shows only July-or-later results, I'm not sure when it started.
For the #885 (comment) point, it could be. But a bigger issue is that we had an interpreter regression long ago, which was at least before Aug 5th. I think we want to figure that out first.
Activity
k0kubun commentedon Nov 21, 2025
For liquid-render, looking at the "Time" tab of https://rubybench.github.io/benchmarks/ruby-bench.html#liquid-render, 2025-11-01 seems a bit suspicious ruby/ruby@17e95cb...17a7b4e
k0kubun commentedon Nov 21, 2025
For liquid-c https://rubybench.github.io/benchmarks/ruby-bench.html#liquid-c, 2025-10-30 ~ 2025-11-01 seems like a problematic range ruby/ruby@6e618a2...17a7b4e
k0kubun commentedon Nov 21, 2025
mail is kind of weird.
On https://rubybench.github.io/benchmarks/ruby-bench.html#mail, it feels like this regression was introduced yesterday ruby/ruby@167c3db...aa9e15c.
But on speed.ruby-lang.org https://speed.ruby-lang.org/stats-timeline.html#yjit_speedup+mail, I'm not sure if we can conclude anything out of the unstable results:
k0kubun commentedon Nov 21, 2025
liquid-c: https://speed.ruby-lang.org/benchmark_timeline.html#liquid-c
I feel like the interpreter also had a regression and it's just copied to YJIT results.
k0kubun commentedon Nov 21, 2025
liquid-render: https://speed.ruby-lang.org/benchmark_timeline.html#liquid-render
probably "the interpreter also had a regression and it's just copied to YJIT results" as well?
k0kubun commentedon Nov 21, 2025
mail: https://speed.ruby-lang.org/benchmark_timeline.html#mail
This looks pretty bad. Given that the Ruby 3.4 results were very stable, the unstable results are probably not the benchmark or the benchmark server's fault, but Ruby 4.0 interpreter's.
k0kubun commentedon Nov 21, 2025
chunky-png: https://speed.ruby-lang.org/benchmark_timeline.html#chunky-png
Something weird is going on at the Oct 9th point, but the latest results seem to be in the same situation.
k0kubun commentedon Nov 21, 2025
So I think it's probably an interpreter regression, not YJIT's. Since
speed.ruby-lang.orgshows only Auguest-or-later results andrubybench.github.ioshows only July-or-later results, I'm not sure when it started.tekknolagi commentedon Nov 21, 2025
Is this write barrier related potentially? ruby@9b87a0b
k0kubun commentedon Nov 21, 2025
For the #885 (comment) point, it could be. But a bigger issue is that we had an interpreter regression long ago, which was at least before Aug 5th. I think we want to figure that out first.
jhawthorn commentedon Nov 24, 2025
I don't think so. I'm expecting that only to be called on classes with multiple
Ruby::Boxtekknolagi commentedon Dec 15, 2025
@jhawthorn can you link the relevant commits/PRs? And then can we close?