YJIT Benchmarks

Details for Benchmarks at 2022-03-11 19:12:17

Overall YJIT is 32.8% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.9% 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 MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 176 75 176 20 176
hexapdf 5 15 20 15
liquid-render 5 154 75 154 20 154
mail 5 122 75 122 20 122
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 67 75 67 20 67
chunky_png 5 30 75 30 20 30
discourse 5 33 75 33 20 33
erubi 5 48 75 48 20 48
erubi_rails 5 979 75 979 20 979
fannkuchredux 5 15 75 15 20 15
lee 5 21 75 21 20 21
nbody 5 277 75 277 20 277
optcarrot 5 15 75 15 20 15
rubykon 5 15 38 15 20 15
30k_ifelse 5 56 75 56 20 56
30k_methods 5 22 29 22 20 22
cfunc_itself 5 442 75 442 20 442
fib 5 318 75 318 20 318
getivar 5 766 75 766 20 766
keyword_args 5 378 75 378 20 378
respond_to 5 109 75 109 20 109
setivar 5 1900 75 1900 20 1900

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) 994513 762079 185 1199 0 0% 0 0 0
hexapdf (click) 1115473 913789 600 8170 615 7% 0 0 320
liquid-render (click) 493649 392491 143 1566 95 6% 0 0 1
mail (click) 895697 671071 324 5503 125 2% 0 0 39
psych-load (click) 331473 262098 59 439 1 0% 0 0 0
railsbench (click) 2536209 1932852 1297 9370 268 2% 0 0 26
binarytrees (click) 144081 109381 11 59 0 0% 0 0 0
chunky_png (click) 365073 284635 85 860 0 0% 0 0 0
discourse (click) 22346001 11237317 3094 280180 257041 91% 2 0 133
erubi (click) 321617 254838 10 79 0 0% 0 0 0
erubi_rails (click) 1912273 1438883 262 1966 18 0% 0 0 3
fannkuchredux (click) 166417 127849 8 189 0 0% 0 0 0
lee (click) 372945 294117 45 587 69 11% 0 0 12
nbody (click) 161233 123610 10 159 0 0% 0 0 0
optcarrot (click) 489361 430183 198 3576 20 0% 0 0 0
rubykon (click) 293585 237508 140 1535 2 0% 0 0 0
30k_ifelse (click) 5533009 4329592 9263 57805 0 0% 0 0 0
30k_methods (click) 2148305 1638167 5782 19362 0 0% 0 0 0
cfunc_itself (click) 150417 115038 8 50 0 0% 0 0 0
fib (click) 149649 115363 8 39 0 0% 0 0 0
getivar (click) 150737 117157 8 66 0 0% 0 0 0
keyword_args (click) 151633 116253 9 52 0 0% 0 0 0
respond_to (click) 152913 117066 8 65 0 0% 0 0 0
setivar (click) 142929 108653 8 39 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.