YJIT Benchmarks

Details for Benchmarks at 2022-10-24 04:49:22

Overall YJIT is 37.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 33.9% 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 202 5 202
hexapdf 5 15 5 15
liquid-render 5 174 5 174
mail 5 129 5 129
psych-load 5 15 5 15
railsbench 5 15 5 15
binarytrees 5 78 5 78
chunky_png 5 32 5 32
erubi 5 69 5 69
erubi_rails 5 1072 5 1072
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 20 5 20
nbody 5 249 5 249
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 476 5 476
fib 5 326 5 326
getivar 5 426 5 426
keyword_args 5 385 5 385
respond_to 5 716 5 716
setivar 5 425 5 425
str_concat 5 464 5 464

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) 4673848 4680468 23 319 6 1% 0 0 0
hexapdf (click) 3670876 3678641 817 9673 189 1% 0 0 0
liquid-render (click) 1400084 1405460 154 1742 34 1% 0 0 0
mail (click) 2824122 2830013 371 4930 176 3% 0 0 0
psych-load (click) 1773672 1780650 68 490 19 3% 0 0 0
railsbench (click) 10229555 10235892 1777 12874 475 3% 0 0 0
binarytrees (click) 590608 598351 14 70 4 5% 0 0 0
chunky_png (click) 1822009 1829100 87 1039 31 2% 0 0 0
erubi (click) 1659948 1666910 11 78 4 5% 0 0 0
erubi_rails (click) 8473278 8480526 327 2447 107 4% 0 0 0
etanni (click) 590991 598685 11 38 4 10% 0 0 0
fannkuchredux (click) 606853 614735 11 200 4 2% 0 0 0
lee (click) 1840834 1847375 77 746 25 3% 0 0 0
nbody (click) 608903 616101 13 179 6 3% 0 0 0
optcarrot (click) 1446606 1453587 201 4001 93 2% 0 0 0
rubykon (click) 886269 894009 143 1560 32 2% 0 0 0
30k_ifelse (click) 11177443 11184412 9266 57127 4 0% 0 0 0
30k_methods (click) 4509842 4516621 5785 19356 4 0% 0 0 0
cfunc_itself (click) 579939 585163 11 53 4 7% 0 0 0
fib (click) 573879 581824 11 42 4 9% 0 0 0
getivar (click) 576532 583585 11 69 4 5% 0 0 0
keyword_args (click) 580679 585804 12 55 4 7% 0 0 0
respond_to (click) 574683 582449 11 55 5 9% 0 0 0
setivar (click) 576125 583333 11 42 4 9% 0 0 0
str_concat (click) 579567 585755 13 68 6 8% 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.