YJIT Benchmarks

Details for Benchmarks at 2023-01-25 13:44:28

Overall YJIT is 37.8% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 38.8% 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 30 180 30 180
hexapdf 30 15 30 15
liquid-c 30 322 30 322
liquid-render 30 186 30 186
mail 30 140 30 140
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 282 30 282
sequel 30 133 30 133
binarytrees 30 84 30 84
chunky_png 30 32 30 32
erubi 30 79 30 79
erubi_rails 30 1163 30 1163
etanni 30 48 30 48
fannkuchredux 30 22 30 22
lee 30 21 30 21
nbody 30 278 30 278
optcarrot 30 15 30 15
rubykon 30 15 30 15
30k_ifelse 30 50 30 50
30k_methods 30 21 30 21
cfunc_itself 30 468 30 468
fib 30 321 30 321
getivar 30 436 30 436
keyword_args 30 375 30 375
respond_to 30 699 30 699
setivar 30 1359 30 1359
setivar_object 30 420 30 420
str_concat 30 451 30 451

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) 2282106 2279988 33 488 8 1% 0 0 0
hexapdf (click) 1700471 1698506 819 10423 217 2% 0 0 0
liquid-c (click) 1141944 1140582 126 1507 34 2% 0 0 0
liquid-render (click) 1140274 1139510 148 1808 36 1% 0 0 0
mail (click) 1235736 1233208 373 4642 176 3% 0 0 0
psych-load (click) 767657 765410 70 657 19 2% 0 0 0
railsbench (click) 5527723 5526610 1779 14440 483 3% 0 0 0
ruby-lsp (click) 5392449 5390432 6428 41879 1541 3% 15604 0 0
sequel (click) 1443341 1442568 17 428 5 1% 0 0 0
binarytrees (click) 96452 94102 16 140 3 2% 0 0 0
chunky_png (click) 798956 797330 89 1192 31 2% 0 0 0
erubi (click) 730692 730034 13 149 4 2% 0 0 0
erubi_rails (click) 4657178 4654896 329 2835 111 3% 0 0 0
etanni (click) 144147 142294 13 108 3 2% 0 0 0
fannkuchredux (click) 104435 101936 14 241 3 1% 0 0 0
lee (click) 789323 788072 79 820 24 2% 0 0 0
nbody (click) 101886 100440 15 245 5 2% 0 0 0
optcarrot (click) 520808 518938 203 4449 92 2% 0 0 0
rubykon (click) 233888 232232 147 1622 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) 86859 84992 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) 86746 84992 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.