YJIT Benchmarks

Details for Benchmarks at 2023-01-20 20:08:07

Overall YJIT is 35.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 39.1% 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 YJIT warmups YJIT iters
activerecord 5 178 5 178
hexapdf 5 15 5 15
liquid-c 5 323 5 323
liquid-render 5 177 5 177
mail 5 140 5 140
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 283 5 283
sequel 5 132 5 132
binarytrees 5 84 5 84
chunky_png 5 32 5 32
erubi 5 80 5 80
erubi_rails 5 1146 5 1146
etanni 5 48 5 48
fannkuchredux 5 21 5 21
lee 5 21 5 21
nbody 5 276 5 276
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 50 5 50
30k_methods 5 20 5 20
cfunc_itself 5 493 5 493
fib 5 325 5 325
getivar 5 437 5 437
keyword_args 5 384 5 384
respond_to 5 705 5 705
setivar 5 1360 5 1360
setivar_object 5 425 5 425
str_concat 5 493 5 493

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) 2281427 2279488 22 401 8 1% 0 0 0
hexapdf (click) 1718616 1716074 819 10435 217 2% 0 0 0
liquid-c (click) 1121864 1121658 126 1485 34 2% 0 0 0
liquid-render (click) 565169 565010 156 1837 32 1% 0 0 0
mail (click) 1248257 1246832 373 4668 176 3% 0 0 0
psych-load (click) 782070 780606 70 651 19 2% 0 0 0
railsbench (click) 5534822 5534472 1779 14360 483 3% 0 0 0
ruby-lsp (click) 5395718 5395142 6428 41819 1537 3% 14404 0 0
sequel (click) 1454459 1452622 17 428 5 1% 0 0 0
binarytrees (click) 96452 94102 16 140 3 2% 0 0 0
chunky_png (click) 803489 803012 89 1188 31 2% 0 0 0
erubi (click) 740367 739024 13 149 4 2% 0 0 0
erubi_rails (click) 4668934 4668044 329 2840 110 3% 0 0 0
etanni (click) 144147 142294 13 108 3 2% 0 0 0
fannkuchredux (click) 107885 107242 14 273 3 1% 0 0 0
lee (click) 805558 804296 79 820 24 2% 0 0 0
nbody (click) 109125 108094 15 245 5 2% 0 0 0
optcarrot (click) 520808 518938 203 4449 92 2% 0 0 0
rubykon (click) 235220 233056 145 1636 30 1% 0 0 0
30k_ifelse (click) 5245189 5242908 9268 57200 3 0% 0 0 0
30k_methods (click) 1993463 1991910 5787 19427 3 0% 0 0 0
cfunc_itself (click) 93744 92254 13 123 3 2% 0 0 0
fib (click) 92325 91458 13 112 3 2% 0 0 0
getivar (click) 94088 92590 13 139 3 2% 0 0 0
keyword_args (click) 94528 92982 14 125 3 2% 0 0 0
respond_to (click) 94250 92738 13 139 4 2% 0 0 0
setivar (click) 93125 91870 13 119 3 2% 0 0 0
setivar_object (click) 93457 92018 13 119 3 2% 0 0 0
str_concat (click) 93983 92570 15 138 5 3% 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.