YJIT Benchmarks

Details for Benchmarks at 2022-12-02 20:10:08 UTC

YJIT metrics from the yjit-bench suite using Ruby 82b86b4c97

Overall YJIT is 36.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 37.7% faster than CRuby!

Performance on Headline Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower 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 191 5 191
hexapdf 5 15 5 15
liquid-render 5 154 5 154
mail 5 139 5 139
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 277 5 277
binarytrees 5 85 5 85
chunky_png 5 32 5 32
erubi 5 69 5 69
erubi_rails 5 1092 5 1092
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 22 5 22
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 480 5 480
fib 5 327 5 327
getivar 5 436 5 436
keyword_args 5 378 5 378
respond_to 5 694 5 694
setivar 5 383 5 383
str_concat 5 498 5 498

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) 2255670 2254379 25 394 6 1% 0 0 0
hexapdf (click) 1688220 1687858 819 9836 216 2% 0 0 0
liquid-render (click) 531252 529182 156 1793 33 1% 0 0 0
mail (click) 1228486 1228229 373 4414 176 3% 0 0 0
psych-load (click) 778781 778469 70 597 19 3% 0 0 0
railsbench (click) 5467479 5465822 1779 13704 482 3% 0 0 0
ruby-lsp (click) 5269909 5268175 6428 40159 1521 3% 14304 0 0
binarytrees (click) 131486 131255 16 139 4 2% 0 0 0
chunky_png (click) 799376 798024 89 1173 31 2% 0 0 0
erubi (click) 727277 725671 13 147 4 2% 0 0 0
erubi_rails (click) 4620401 4619913 329 2675 111 4% 0 0 0
etanni (click) 125021 124262 13 107 4 3% 0 0 0
fannkuchredux (click) 143687 142260 14 272 4 1% 0 0 0
lee (click) 801419 799606 79 804 25 3% 0 0 0
nbody (click) 144027 142446 15 235 6 2% 0 0 0
optcarrot (click) 538904 537064 203 4052 93 2% 0 0 0
rubykon (click) 272143 271492 146 1608 31 1% 0 0 0
30k_ifelse (click) 5280777 5280299 9268 57196 4 0% 0 0 0
30k_methods (click) 2028680 2026891 5787 19425 4 0% 0 0 0
cfunc_itself (click) 130788 128452 13 122 4 3% 0 0 0
fib (click) 120768 118995 13 111 4 3% 0 0 0
getivar (click) 129788 127882 13 138 4 2% 0 0 0
keyword_args (click) 130188 128068 14 124 4 3% 0 0 0
respond_to (click) 129909 127975 13 138 5 3% 0 0 0
setivar (click) 130210 128068 13 111 4 3% 0 0 0
str_concat (click) 129669 127832 15 137 6 4% 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.