YJIT Benchmarks

Details for Benchmarks at 2021-11-18 07:10:28

Overall YJIT is 28.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 17.7% faster than CRuby!

The basic "faster" measurement is the geomean of all "headlining" x86 benchmarks on this page.

Headlining Benchmarks

These are "headlining" because the "overall" speedup above is based on these benchmarks specifically.

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Other Benchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

MicroBenchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench No JIT warmups No JIT iters MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 25 180 25 158 25 154 25 256
hexapdf 25 15 25 15 25 15
liquid-render 25 144 25 160 25 157 25 238
mail 25 165 25 177 25 164 25 185
psych-load 25 15 25 15 25 15 25 15
railsbench 25 15 25 15 25 15 25 15
binarytrees 25 60 25 105 25 101 25 84
fannkuchredux 25 15 25 15 25 15 25 15
jekyll 25 15 25 15 25 15 25 15
lee 25 15 25 15 25 15 25 15
nbody 25 254 25 465 25 482 25 388
optcarrot 25 15 25 15 25 15 25 15
rubykon 25 15 25 15 25 15 25 15
30k_ifelse 25 15 25 15 25 15 25 71
30k_methods 25 15 25 15 25 15 25 16
cfunc_itself 25 317 25 480 25 445 25 748
fib 25 132 25 474 25 454 25 549
getivar 25 332 25 307 25 334 25 807
keyword_args 25 103 25 134 25 135 25 625
respond_to 25 105 25 123 25 122 25 172
setivar 25 430 25 416 25 431 25 743

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT and MJIT 3.0 both warm up quite quickly, while MJIT in 3.1 often slows down for a time as it compiles, after an unpredictable delay.

Benchmark YJIT Stats

Hover your cursor over the benchmark names for descriptions of each benchmark.

bench Exit Report Inline Outlined Comp iSeqs Comp Blocks Inval Inval Ratio Bind Alloc Bind Set Const Bumps
activerecord (click) 969386 679316 184 1180 0 0% 0 0 0
hexapdf (click) 1081770 809501 595 8010 614 7% 0 0 320
liquid-render (click) 463927 339401 143 1397 95 6% 0 0 1
mail (click) 877738 603991 339 5460 124 2% 0 0 39
psych-load (click) 296737 211717 57 435 1 0% 0 0 0
railsbench (click) 2596258 1803690 1295 9778 264 2% 0 0 26
binarytrees (click) 112933 80892 9 48 0 0% 0 0 0
fannkuchredux (click) 128933 92902 6 202 0 0% 0 0 0
jekyll (click) 1886058 1391470 336 3932 179 4% 0 0 0
lee (click) 344362 239769 44 566 67 11% 0 0 12
nbody (click) 122341 87727 8 148 0 0% 0 0 0
optcarrot (click) 451493 381560 196 3566 20 0% 0 0 0
rubykon (click) 256997 199354 138 1557 1 0% 0 0 0
30k_ifelse (click) 5502309 4301349 9261 57794 0 0% 0 0 0
30k_methods (click) 2117413 1609811 5780 19351 0 0% 0 0 0
cfunc_itself (click) 111717 79654 6 39 0 0% 0 0 0
fib (click) 109989 79129 6 28 0 0% 0 0 0
getivar (click) 111717 81640 6 55 0 0% 0 0 0
keyword_args (click) 112357 80162 7 41 0 0% 0 0 0
respond_to (click) 113637 80855 6 54 0 0% 0 0 0
setivar (click) 111653 80164 6 28 0 0% 0 0 0

YJIT stats correspond to the YJIT stats exit report.

Note: currently, all stats are collected on x86_64, not ARM.

Raw JSON data files

All graphs and table data in this page comes from processing these data files, which come from benchmark runs.