YJIT Benchmarks

Details for Benchmarks at 2022-11-09 04:25:25

Overall YJIT is 32.7% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 34.8% 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 YJIT warmups YJIT iters
activerecord 5 205 5 205
hexapdf 5 15 5 15
liquid-render 5 177 5 177
mail 5 124 5 124
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 234 5 234
binarytrees 5 79 5 79
chunky_png 5 32 5 32
erubi 5 67 5 67
erubi_rails 5 1135 5 1135
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 20 5 20
nbody 5 247 5 247
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 477 5 477
fib 5 331 5 331
getivar 5 426 5 426
keyword_args 5 387 5 387
respond_to 5 715 5 715
setivar 5 423 5 423
str_concat 5 467 5 467

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) 2337453 2335996 25 387 6 1% 0 0 0
hexapdf (click) 1797728 1795903 819 10225 189 1% 0 0 0
liquid-render (click) 596350 594201 156 1839 34 1% 0 0 0
mail (click) 1337379 1336340 373 5177 176 3% 0 0 0
psych-load (click) 814026 812860 70 628 19 3% 0 0 0
railsbench (click) 5677253 5676036 1779 13936 484 3% 0 0 0
ruby-lsp (click) 5636137 5634770 6425 41648 1523 3% 11954 0 0
binarytrees (click) 135337 133891 16 134 4 2% 0 0 0
chunky_png (click) 835257 835133 89 1179 31 2% 0 0 0
erubi (click) 744304 742054 13 142 4 2% 0 0 0
erubi_rails (click) 4770176 4768396 329 2663 111 4% 0 0 0
etanni (click) 128722 126780 13 102 4 3% 0 0 0
fannkuchredux (click) 147370 147348 13 264 4 1% 0 0 0
lee (click) 834354 832100 79 804 25 3% 0 0 0
nbody (click) 149991 148933 15 243 6 2% 0 0 0
optcarrot (click) 569856 568254 203 4069 93 2% 0 0 0
rubykon (click) 278581 278392 145 1642 32 1% 0 0 0
30k_ifelse (click) 5419417 5419293 9268 57191 4 0% 0 0 0
30k_methods (click) 2095283 2092887 5787 19420 4 0% 0 0 0
cfunc_itself (click) 133238 132335 13 117 4 3% 0 0 0
fib (click) 124295 123865 13 106 4 3% 0 0 0
getivar (click) 126375 125130 13 133 4 3% 0 0 0
keyword_args (click) 134030 132897 14 119 4 3% 0 0 0
respond_to (click) 133754 132729 13 133 5 3% 0 0 0
setivar (click) 134015 132897 13 106 4 3% 0 0 0
str_concat (click) 125978 124711 15 132 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.