YJIT Benchmarks

Details for Benchmarks at 2022-01-23 07:12:27

Overall YJIT is 31.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 28.2% 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 MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 198 20 198 75 198 20 198
hexapdf 5 15 20 15 20 15
liquid-render 5 181 20 181 75 181 20 181
mail 5 144 20 144 75 144 20 144
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 88 20 88 75 88 20 88
erubi 5 56 20 56 75 56 20 56
erubi_rails 5 1041 20 1041 75 1041 20 1041
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 344 20 344 75 344 20 344
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 43 15 20 15
30k_ifelse 5 62 20 62 69 62 20 62
30k_methods 5 26 20 26 43 26 20 26
cfunc_itself 5 528 20 528 75 528 20 528
fib 5 383 20 383 75 383 20 383
getivar 5 952 20 952 75 952 20 952
keyword_args 5 455 20 455 75 455 20 455
respond_to 5 127 20 127 75 127 20 127
setivar 5 2183 20 2183 75 2183 20 2183

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) 974737 747664 185 1198 0 0% 0 0 0
hexapdf (click) 1100817 902383 599 8161 613 7% 0 0 321
liquid-render (click) 476113 378321 143 1507 95 6% 0 0 1
mail (click) 880529 660062 325 5481 124 2% 0 0 39
psych-load (click) 306769 243382 58 428 1 0% 0 0 0
railsbench (click) 2511313 1913472 1297 9295 268 2% 0 0 26
binarytrees (click) 119441 91722 10 54 0 0% 0 0 0
erubi (click) 301777 240452 9 73 0 0% 0 0 0
erubi_rails (click) 1901201 1431202 261 1959 18 0% 0 0 3
fannkuchredux (click) 134161 103144 7 192 0 0% 0 0 0
lee (click) 344529 271672 45 586 70 11% 0 0 12
nbody (click) 128337 98707 9 154 0 0% 0 0 0
optcarrot (click) 455953 404553 197 3571 20 0% 0 0 0
rubykon (click) 260049 211823 140 1529 2 0% 0 0 0
30k_ifelse (click) 5507985 4311717 9262 57800 0 0% 0 0 0
30k_methods (click) 2123153 1620179 5781 19357 0 0% 0 0 0
cfunc_itself (click) 117393 90022 7 45 0 0% 0 0 0
fib (click) 115985 89630 7 34 0 0% 0 0 0
getivar (click) 117713 92141 7 61 0 0% 0 0 0
keyword_args (click) 118289 90663 8 47 0 0% 0 0 0
respond_to (click) 119569 91476 7 60 0 0% 0 0 0
setivar (click) 118225 90994 7 34 0 0% 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.