YJIT Benchmarks

Details for Benchmarks at 2022-01-18 19:12:57

Overall YJIT is 31.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 28.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 197 20 197 75 197 20 197
hexapdf 5 15 20 15 20 15
liquid-render 5 184 20 184 75 184 20 184
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 86 20 86 75 86 20 86
erubi 5 54 20 54 75 54 20 54
erubi_rails 5 1042 20 1042 75 1042 20 1042
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 342 20 342 75 342 20 342
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 44 15 20 15
30k_ifelse 5 65 20 65 75 65 20 65
30k_methods 5 26 20 26 42 26 20 26
cfunc_itself 5 506 20 506 75 506 20 506
fib 5 383 20 383 75 383 20 383
getivar 5 962 20 962 75 962 20 962
keyword_args 5 451 20 451 75 451 20 451
respond_to 5 125 20 125 75 125 20 125
setivar 5 2200 20 2200 75 2200 20 2200

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) 965585 740027 185 1192 0 0% 0 0 0
hexapdf (click) 1094417 897091 599 8169 614 7% 0 0 321
liquid-render (click) 476433 378953 143 1542 96 6% 0 0 1
mail (click) 859025 643034 324 5332 124 2% 0 0 39
psych-load (click) 296401 234063 58 434 1 0% 0 0 0
railsbench (click) 2512273 1913456 1297 9345 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) 1890577 1423515 261 1917 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) 253521 206659 139 1529 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) 111249 85646 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.