YJIT Benchmarks

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

Overall YJIT is 28.1% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 22.2% 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 139 20 139 75 139 20 139
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 54 20 54 75 54 20 54
erubi_rails 5 987 20 987 75 987 20 987
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 42 15 20 15
30k_ifelse 5 64 20 64 70 64 20 64
30k_methods 5 27 20 27 43 27 20 27
cfunc_itself 5 536 20 536 75 536 20 536
fib 5 383 20 383 75 383 20 383
getivar 5 950 20 950 75 950 20 950
keyword_args 5 451 20 451 75 451 20 451
respond_to 5 119 20 119 75 119 20 119
setivar 5 2177 20 2177 75 2177 20 2177

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) 973841 747092 185 1195 0 0% 0 0 0
hexapdf (click) 1102289 903377 600 8174 613 7% 0 0 321
liquid-render (click) 475537 378253 143 1505 95 6% 0 0 1
mail (click) 882577 661148 324 5499 124 2% 0 0 39
psych-load (click) 306769 243382 58 428 1 0% 0 0 0
railsbench (click) 2515985 1917024 1297 9345 268 2% 0 0 26
binarytrees (click) 119441 91722 10 54 0 0% 0 0 0
erubi (click) 301329 240188 9 73 0 0% 0 0 0
erubi_rails (click) 1898705 1429612 261 1932 18 0% 0 0 3
fannkuchredux (click) 134161 103144 7 192 0 0% 0 0 0
lee (click) 343953 271343 45 586 70 11% 0 0 12
nbody (click) 128209 98594 9 154 0 0% 0 0 0
optcarrot (click) 455441 404224 197 3571 20 0% 0 0 0
rubykon (click) 260241 211813 139 1530 1 0% 0 0 0
30k_ifelse (click) 5508497 4312046 9262 57800 0 0% 0 0 0
30k_methods (click) 2123153 1620179 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) 118289 90663 8 47 0 0% 0 0 0
respond_to (click) 119569 91476 7 60 0 0% 0 0 0
setivar (click) 117713 90665 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.