YJIT Benchmarks

Details for Benchmarks at 2022-01-19 07:12:44

Overall YJIT is 30.0% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 26.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 MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 195 20 195 75 195 20 195
hexapdf 5 15 20 15 20 15
liquid-render 5 182 20 182 75 182 20 182
mail 5 144 20 144 75 144 20 144
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 85 20 85 75 85 20 85
erubi 5 56 20 56 75 56 20 56
erubi_rails 5 1057 20 1057 75 1057 20 1057
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 343 20 343 75 343 20 343
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 44 15 20 15
30k_ifelse 5 64 20 64 75 64 20 64
30k_methods 5 26 20 26 44 26 20 26
cfunc_itself 5 529 20 529 75 529 20 529
fib 5 384 20 384 75 384 20 384
getivar 5 962 20 962 75 962 20 962
keyword_args 5 439 20 439 75 439 20 439
respond_to 5 127 20 127 75 127 20 127
setivar 5 2215 20 2215 75 2215 20 2215

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) 966481 740472 185 1192 0 0% 0 0 0
hexapdf (click) 1094481 896918 600 8167 612 7% 0 0 321
liquid-render (click) 480017 381500 143 1566 96 6% 0 0 1
mail (click) 875153 654784 324 5493 124 2% 0 0 39
psych-load (click) 297809 234786 58 445 1 0% 0 0 0
railsbench (click) 2513041 1913917 1297 9359 268 2% 0 0 26
binarytrees (click) 113809 87146 10 54 0 0% 0 0 0
erubi (click) 294353 234154 9 73 0 0% 0 0 0
erubi_rails (click) 1887953 1421313 261 1889 18 0% 0 0 3
fannkuchredux (click) 127569 97844 7 184 0 0% 0 0 0
lee (click) 336529 265004 45 586 72 12% 0 0 12
nbody (click) 122705 94131 9 154 0 0% 0 0 0
optcarrot (click) 450321 399977 197 3571 20 0% 0 0 0
rubykon (click) 258961 210255 139 1568 1 0% 0 0 0
30k_ifelse (click) 5502353 4307141 9262 57800 0 0% 0 0 0
30k_methods (click) 2118033 1615932 5781 19357 0 0% 0 0 0
cfunc_itself (click) 111889 85559 7 45 0 0% 0 0 0
fib (click) 110865 85383 7 34 0 0% 0 0 0
getivar (click) 112017 87497 7 61 0 0% 0 0 0
keyword_args (click) 112785 86200 8 47 0 0% 0 0 0
respond_to (click) 114065 87013 7 60 0 0% 0 0 0
setivar (click) 112081 86089 7 34 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.