YJIT Benchmarks

Details for Benchmarks at 2022-10-12 20:10:44

Overall YJIT is 37.1% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 30.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 197 5 197
hexapdf 5 15 5 15
liquid-render 5 172 5 172
mail 5 128 5 128
psych-load 5 15 5 15
railsbench 5 15 5 15
binarytrees 5 84 5 84
chunky_png 5 31 5 31
erubi 5 68 5 68
erubi_rails 5 1071 5 1071
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 246 5 246
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 57 5 57
30k_methods 5 24 5 24
cfunc_itself 5 492 5 492
fib 5 326 5 326
getivar 5 426 5 426
keyword_args 5 377 5 377
respond_to 5 683 5 683
setivar 5 369 5 369
str_concat 5 479 5 479

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) 2483601 1476333 23 283 6 2% 0 0 0
hexapdf (click) 1899027 1297060 872 9615 189 1% 0 0 0
liquid-render (click) 735315 482433 154 1743 34 1% 0 0 0
mail (click) 1484435 955197 385 4959 176 3% 0 0 0
psych-load (click) 946067 608934 68 489 19 3% 0 0 0
railsbench (click) 5417233 3310988 1784 12852 475 3% 0 0 0
binarytrees (click) 313363 195821 14 70 4 5% 0 0 0
chunky_png (click) 967507 628235 87 1039 31 2% 0 0 0
erubi (click) 880595 572342 11 78 4 5% 0 0 0
erubi_rails (click) 4488337 2659705 327 2475 107 4% 0 0 0
etanni (click) 314515 196038 11 38 4 10% 0 0 0
fannkuchredux (click) 322003 202926 11 200 4 2% 0 0 0
lee (click) 979155 637922 80 746 25 3% 0 0 0
nbody (click) 323987 203110 13 179 6 3% 0 0 0
optcarrot (click) 749331 539711 201 4001 93 2% 0 0 0
rubykon (click) 461715 308922 143 1564 32 2% 0 0 0
30k_ifelse (click) 5594835 4339501 9266 57127 4 0% 0 0 0
30k_methods (click) 2266899 1720371 5785 19356 4 0% 0 0 0
cfunc_itself (click) 306835 191372 11 53 4 7% 0 0 0
fib (click) 312275 194849 11 42 4 9% 0 0 0
getivar (click) 307155 192615 11 69 4 5% 0 0 0
keyword_args (click) 311571 194314 12 55 4 7% 0 0 0
respond_to (click) 308819 192988 11 55 5 9% 0 0 0
setivar (click) 310227 193378 11 42 4 9% 0 0 0
str_concat (click) 311059 194522 13 68 6 8% 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.