YJIT Benchmarks

Details for Benchmarks at 2022-11-08 20:11:06

Overall YJIT is 32.0% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 35.7% 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 178 5 178
mail 5 124 5 124
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 248 5 248
binarytrees 5 80 5 80
chunky_png 5 31 5 31
erubi 5 68 5 68
erubi_rails 5 1100 5 1100
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 248 5 248
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 496 5 496
fib 5 331 5 331
getivar 5 426 5 426
keyword_args 5 381 5 381
respond_to 5 692 5 692
setivar 5 404 5 404
str_concat 5 460 5 460

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) 2340824 2338401 25 404 6 1% 0 0 0
hexapdf (click) 1795879 1794781 820 10213 189 1% 0 0 0
liquid-render (click) 601510 600302 156 1839 34 1% 0 0 0
mail (click) 1346986 1345665 373 5135 176 3% 0 0 0
psych-load (click) 812202 811783 70 629 19 3% 0 0 0
railsbench (click) 5672924 5672898 1779 13918 483 3% 0 0 0
ruby-lsp (click) 5627396 5626140 6425 41569 1523 3% 11954 0 0
binarytrees (click) 127762 126210 16 134 4 2% 0 0 0
chunky_png (click) 835301 835158 89 1168 31 2% 0 0 0
erubi (click) 757455 756203 13 142 4 2% 0 0 0
erubi_rails (click) 4766191 4765447 329 2692 111 4% 0 0 0
etanni (click) 128638 126780 13 102 4 3% 0 0 0
fannkuchredux (click) 147284 144931 13 264 4 1% 0 0 0
lee (click) 840011 838367 79 804 25 3% 0 0 0
nbody (click) 149923 148933 15 243 6 2% 0 0 0
optcarrot (click) 562248 560327 203 4069 93 2% 0 0 0
rubykon (click) 278403 278392 145 1645 32 1% 0 0 0
30k_ifelse (click) 5419345 5419200 9268 57191 4 0% 0 0 0
30k_methods (click) 2087607 2087498 5787 19420 4 0% 0 0 0
cfunc_itself (click) 125670 124543 13 117 4 3% 0 0 0
fib (click) 124206 123694 13 106 4 3% 0 0 0
getivar (click) 126288 125130 13 133 4 3% 0 0 0
keyword_args (click) 133960 132897 14 119 4 3% 0 0 0
respond_to (click) 133681 132729 13 133 5 3% 0 0 0
setivar (click) 126460 125155 13 106 4 3% 0 0 0
str_concat (click) 125903 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.