YJIT Benchmarks

Details for Benchmarks at 2022-01-19 19:13:03

Overall YJIT is 32.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 32.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 MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 189 20 189 75 189 20 189
hexapdf 5 15 20 15 20 15
liquid-render 5 180 20 180 75 180 20 180
mail 5 138 20 138 75 138 20 138
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 86 20 86 75 86 20 86
erubi 5 54 20 54 75 54 20 54
erubi_rails 5 981 20 981 75 981 20 981
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 42 15 20 15
30k_ifelse 5 63 20 63 75 63 20 63
30k_methods 5 26 20 26 42 26 20 26
cfunc_itself 5 529 20 529 75 529 20 529
fib 5 382 20 382 75 382 20 382
getivar 5 964 20 964 75 964 20 964
keyword_args 5 453 20 453 75 453 20 453
respond_to 5 123 20 123 75 123 20 123
setivar 5 2199 20 2199 75 2199 20 2199

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) 966673 740668 185 1195 0 0% 0 0 0
hexapdf (click) 1094865 897227 599 8168 614 7% 0 0 321
liquid-render (click) 478609 380547 143 1570 95 6% 0 0 1
mail (click) 854161 640378 324 5282 124 2% 0 0 39
psych-load (click) 297809 234786 58 445 1 0% 0 0 0
railsbench (click) 2511505 1913155 1297 9336 269 2% 0 0 26
binarytrees (click) 113425 86930 10 54 0 0% 0 0 0
erubi (click) 294737 234370 9 73 0 0% 0 0 0
erubi_rails (click) 1886737 1420807 261 1892 18 0% 0 0 3
fannkuchredux (click) 127569 97844 7 184 0 0% 0 0 0
lee (click) 337041 265333 45 586 72 12% 0 0 12
nbody (click) 123089 94347 9 154 0 0% 0 0 0
optcarrot (click) 449809 399648 197 3571 20 0% 0 0 0
rubykon (click) 255377 207616 140 1529 1 0% 0 0 0
30k_ifelse (click) 5502865 4307470 9262 57800 0 0% 0 0 0
30k_methods (click) 2117521 1615603 5781 19357 0 0% 0 0 0
cfunc_itself (click) 111761 85446 7 45 0 0% 0 0 0
fib (click) 110353 85054 7 34 0 0% 0 0 0
getivar (click) 112593 87894 7 61 0 0% 0 0 0
keyword_args (click) 112657 86087 8 47 0 0% 0 0 0
respond_to (click) 114449 87229 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.