YJIT Benchmarks

Details for Benchmarks at 2022-01-16 07:12:18

Overall YJIT is 32.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.4% 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 194 20 194 75 194 20 194
hexapdf 5 15 20 15 20 15
liquid-render 5 183 20 183 75 183 20 183
mail 5 142 20 142 75 142 20 142
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 1026 20 1026 75 1026 20 1026
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 44 15 20 15
30k_ifelse 5 64 20 64 75 64 20 64
30k_methods 5 26 20 26 43 26 20 26
cfunc_itself 5 507 20 507 75 507 20 507
fib 5 384 20 384 75 384 20 384
getivar 5 961 20 961 75 961 20 961
keyword_args 5 450 20 450 75 450 20 450
respond_to 5 126 20 126 75 126 20 126
setivar 5 2215 20 2215 75 2215 20 2215

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) 967121 741113 185 1198 0 0% 0 0 0
hexapdf (click) 1094673 897015 599 8165 613 7% 0 0 321
liquid-render (click) 478289 380448 143 1572 95 6% 0 0 1
mail (click) 874065 654427 324 5489 124 2% 0 0 39
psych-load (click) 296401 233989 58 445 1 0% 0 0 0
railsbench (click) 2512529 1914681 1297 9349 268 2% 0 0 26
binarytrees (click) 112465 86374 10 54 0 0% 0 0 0
erubi (click) 294673 234301 9 73 0 0% 0 0 0
erubi_rails (click) 1885969 1420251 261 1872 18 0% 0 0 3
fannkuchredux (click) 126225 97072 7 184 0 0% 0 0 0
lee (click) 336977 265264 45 586 72 12% 0 0 12
nbody (click) 121745 93575 9 154 0 0% 0 0 0
optcarrot (click) 448977 399205 197 3571 20 0% 0 0 0
rubykon (click) 255825 208534 140 1550 1 0% 0 0 0
30k_ifelse (click) 5501521 4306698 9262 57800 0 0% 0 0 0
30k_methods (click) 2116689 1615160 5781 19357 0 0% 0 0 0
cfunc_itself (click) 110929 85003 7 45 0 0% 0 0 0
fib (click) 109521 84611 7 34 0 0% 0 0 0
getivar (click) 111249 87122 7 61 0 0% 0 0 0
keyword_args (click) 111825 85644 8 47 0 0% 0 0 0
respond_to (click) 113105 86457 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.