YJIT Benchmarks

Details for Benchmarks at 2022-01-09 19:09:37

Overall YJIT is 30.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 31.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 MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 181 20 181 75 181 20 181
hexapdf 5 15 20 15 20 15
liquid-render 5 160 20 160 75 160 20 160
mail 5 140 20 140 75 140 20 140
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 85 20 85 75 85 20 85
erubi 5 56 20 56 75 56 20 56
erubi_rails 5 954 20 954 75 954 20 954
fannkuchredux 5 15 20 15 54 15 20 15
lee 5 27 20 27 75 27 20 27
nbody 5 343 20 343 75 343 20 343
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 43 15 20 15
30k_ifelse 5 65 20 65 71 65 20 65
30k_methods 5 27 20 27 43 27 20 27
cfunc_itself 5 520 20 520 75 520 20 520
fib 5 382 20 382 75 382 20 382
getivar 5 563 20 563 75 563 20 563
keyword_args 5 435 20 435 75 435 20 435
respond_to 5 120 20 120 75 120 20 120
setivar 5 456 20 456 75 456 20 456

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) 968017 741257 185 1198 0 0% 0 0 0
hexapdf (click) 1111633 912297 599 8094 612 7% 0 0 321
liquid-render (click) 470993 373625 144 1461 95 6% 0 0 1
mail (click) 843729 628892 326 5258 124 2% 0 0 39
psych-load (click) 302353 236886 59 433 1 0% 0 0 0
railsbench (click) 2502801 1903165 1296 9238 266 2% 0 0 26
binarytrees (click) 113745 87077 10 54 0 0% 0 0 0
erubi (click) 291857 231182 9 73 0 0% 0 0 0
erubi_rails (click) 1892369 1424091 261 1971 16 0% 0 0 3
fannkuchredux (click) 127633 97888 7 184 0 0% 0 0 0
lee (click) 332433 262136 45 579 72 12% 0 0 12
nbody (click) 123025 94278 9 154 0 0% 0 0 0
optcarrot (click) 450385 400021 197 3571 20 0% 0 0 0
rubykon (click) 254673 207196 140 1524 1 0% 0 0 0
30k_ifelse (click) 5502801 4307401 9262 57800 0 0% 0 0 0
30k_methods (click) 2118481 1616192 5781 19357 0 0% 0 0 0
cfunc_itself (click) 112209 85706 7 45 0 0% 0 0 0
fib (click) 110801 85314 7 34 0 0% 0 0 0
getivar (click) 112657 87938 7 61 0 0% 0 0 0
keyword_args (click) 113105 86347 8 47 0 0% 0 0 0
respond_to (click) 114385 87160 7 60 0 0% 0 0 0
setivar (click) 112529 86349 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.