YJIT Benchmarks

Details for Benchmarks at 2022-11-03 04:20:35

Overall YJIT is 33.3% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 36.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 206 5 206
hexapdf 5 15 5 15
liquid-render 5 179 5 179
mail 5 127 5 127
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 251 5 251
binarytrees 5 86 5 86
chunky_png 5 31 5 31
erubi 5 66 5 66
erubi_rails 5 1072 5 1072
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 20 5 20
nbody 5 254 5 254
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 49 5 49
30k_methods 5 21 5 21
cfunc_itself 5 494 5 494
fib 5 326 5 326
getivar 5 426 5 426
keyword_args 5 376 5 376
respond_to 5 714 5 714
setivar 5 374 5 374
str_concat 5 418 5 418

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) 2323766 2321280 23 372 6 1% 0 0 0
hexapdf (click) 1790272 1788585 818 10191 189 1% 0 0 0
liquid-render (click) 555731 553004 154 1793 34 1% 0 0 0
mail (click) 1342344 1340001 371 5099 176 3% 0 0 0
psych-load (click) 805132 804107 68 583 19 3% 0 0 0
railsbench (click) 5669202 5667850 1777 13898 483 3% 0 0 0
ruby-lsp (click) 5647927 5645652 6423 41780 1520 3% 12754 0 0
binarytrees (click) 130426 127888 14 89 4 4% 0 0 0
chunky_png (click) 830218 829001 87 1132 31 2% 0 0 0
erubi (click) 738214 737697 11 97 4 4% 0 0 0
erubi_rails (click) 4759466 4758508 327 2615 111 4% 0 0 0
etanni (click) 123808 123235 11 57 4 7% 0 0 0
fannkuchredux (click) 142459 141267 11 219 4 1% 0 0 0
lee (click) 830908 829502 77 759 25 3% 0 0 0
nbody (click) 145119 143430 13 198 6 3% 0 0 0
optcarrot (click) 557426 556977 201 4024 93 2% 0 0 0
rubykon (click) 273573 272305 143 1599 32 2% 0 0 0
30k_ifelse (click) 5421825 5420885 9266 57146 4 0% 0 0 0
30k_methods (click) 2082775 2081467 5785 19375 4 0% 0 0 0
cfunc_itself (click) 128330 126281 11 72 4 5% 0 0 0
fib (click) 126876 125394 11 61 4 6% 0 0 0
getivar (click) 128947 127370 11 88 4 4% 0 0 0
keyword_args (click) 121628 118967 12 74 4 5% 0 0 0
respond_to (click) 121352 119290 11 88 5 5% 0 0 0
setivar (click) 121625 118635 11 61 4 6% 0 0 0
str_concat (click) 128573 126924 13 87 6 6% 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.