YJIT Benchmarks

Details for Benchmarks at 2022-01-25 07:12:33

Overall YJIT is 30.1% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 27.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 MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 198 20 198 75 198 20 198
hexapdf 5 15 20 15 20 15
liquid-render 5 176 20 176 75 176 20 176
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 53 20 53 75 53 20 53
erubi_rails 5 984 20 984 75 984 20 984
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 344 20 344 75 344 20 344
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 43 15 20 15
30k_ifelse 5 65 20 65 75 65 20 65
30k_methods 5 26 20 26 41 26 20 26
cfunc_itself 5 528 20 528 75 528 20 528
fib 5 382 20 382 75 382 20 382
getivar 5 946 20 946 75 946 20 946
keyword_args 5 453 20 453 75 453 20 453
respond_to 5 124 20 124 75 124 20 124
setivar 5 2179 20 2179 75 2179 20 2179

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) 974225 747335 185 1198 0 0% 0 0 0
hexapdf (click) 1100817 902355 599 8162 613 7% 0 0 321
liquid-render (click) 481809 383149 143 1570 95 6% 0 0 1
mail (click) 882641 661663 325 5498 124 2% 0 0 39
psych-load (click) 307281 243711 58 428 1 0% 0 0 0
railsbench (click) 2517841 1917739 1297 9347 268 2% 0 0 26
binarytrees (click) 118929 91393 10 54 0 0% 0 0 0
erubi (click) 301841 240517 9 73 0 0% 0 0 0
erubi_rails (click) 1896657 1428367 261 1921 18 0% 0 0 3
fannkuchredux (click) 134161 103144 7 192 0 0% 0 0 0
lee (click) 344465 271672 45 586 70 11% 0 0 12
nbody (click) 128721 98923 9 154 0 0% 0 0 0
optcarrot (click) 455953 404553 197 3571 20 0% 0 0 0
rubykon (click) 261777 213015 140 1538 1 0% 0 0 0
30k_ifelse (click) 5507985 4311717 9262 57800 0 0% 0 0 0
30k_methods (click) 2123665 1620508 5781 19357 0 0% 0 0 0
cfunc_itself (click) 117905 90351 7 45 0 0% 0 0 0
fib (click) 116497 89959 7 34 0 0% 0 0 0
getivar (click) 117713 92141 7 61 0 0% 0 0 0
keyword_args (click) 118801 90992 8 47 0 0% 0 0 0
respond_to (click) 119569 91476 7 60 0 0% 0 0 0
setivar (click) 118225 90994 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.