YJIT Benchmarks

Details for Benchmarks at 2022-11-09 20:10:31

Overall YJIT is 33.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 33.0% 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 206 5 206
hexapdf 5 15 5 15
liquid-render 5 176 5 176
mail 5 127 5 127
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 234 5 234
binarytrees 5 86 5 86
chunky_png 5 32 5 32
erubi 5 67 5 67
erubi_rails 5 1114 5 1114
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 255 5 255
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 498 5 498
fib 5 326 5 326
getivar 5 426 5 426
keyword_args 5 376 5 376
respond_to 5 710 5 710
setivar 5 424 5 424
str_concat 5 460 5 460

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) 2328433 2327325 25 408 6 1% 0 0 0
hexapdf (click) 1786688 1786133 819 10253 189 1% 0 0 0
liquid-render (click) 601647 600375 156 1838 34 1% 0 0 0
mail (click) 1346953 1345665 373 5131 176 3% 0 0 0
psych-load (click) 814757 813505 70 629 19 3% 0 0 0
railsbench (click) 5680896 5678496 1779 13895 484 3% 0 0 0
ruby-lsp (click) 5601611 5600952 6425 41423 1523 3% 12054 0 0
binarytrees (click) 127828 126210 16 134 4 2% 0 0 0
chunky_png (click) 822258 821046 89 1168 31 2% 0 0 0
erubi (click) 757197 755934 13 142 4 2% 0 0 0
erubi_rails (click) 4772360 4770021 329 2692 111 4% 0 0 0
etanni (click) 128707 126780 13 102 4 3% 0 0 0
fannkuchredux (click) 147370 147348 13 264 4 1% 0 0 0
lee (click) 837828 836851 79 804 25 3% 0 0 0
nbody (click) 149991 148933 15 243 6 2% 0 0 0
optcarrot (click) 569856 568254 203 4069 93 2% 0 0 0
rubykon (click) 277624 275281 145 1636 32 1% 0 0 0
30k_ifelse (click) 5426943 5424516 9268 57191 4 0% 0 0 0
30k_methods (click) 2095283 2092887 5787 19420 4 0% 0 0 0
cfunc_itself (click) 133238 132335 13 117 4 3% 0 0 0
fib (click) 131774 131305 13 106 4 3% 0 0 0
getivar (click) 133856 132729 13 133 4 3% 0 0 0
keyword_args (click) 134030 132897 14 119 4 3% 0 0 0
respond_to (click) 133754 132729 13 133 5 3% 0 0 0
setivar (click) 134015 132897 13 106 4 3% 0 0 0
str_concat (click) 133468 132561 15 132 6 4% 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.