YJIT Benchmarks

Details for Benchmarks at 2022-01-24 19:45:59

Overall YJIT is 31.0% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.5% 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 189 20 189 75 189 20 189
hexapdf 5 15 20 15 20 15
liquid-render 5 177 20 177 75 177 20 177
mail 5 143 20 143 75 143 20 143
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 54 20 54 75 54 20 54
erubi_rails 5 979 20 979 75 979 20 979
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 25 20 25 75 25 20 25
nbody 5 343 20 343 75 343 20 343
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 42 26 20 26
cfunc_itself 5 525 20 525 75 525 20 525
fib 5 384 20 384 75 384 20 384
getivar 5 954 20 954 75 954 20 954
keyword_args 5 450 20 450 75 450 20 450
respond_to 5 120 20 120 75 120 20 120
setivar 5 2187 20 2187 75 2187 20 2187

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) 974545 747568 185 1198 0 0% 0 0 0
hexapdf (click) 1100689 902548 599 8163 615 7% 0 0 321
liquid-render (click) 481041 382891 143 1568 95 6% 0 0 1
mail (click) 864465 648486 325 5311 124 2% 0 0 39
psych-load (click) 306769 243382 58 428 1 0% 0 0 0
railsbench (click) 2519377 1919240 1297 9378 268 2% 0 0 26
binarytrees (click) 118929 91393 10 54 0 0% 0 0 0
erubi (click) 301457 240301 9 73 0 0% 0 0 0
erubi_rails (click) 1897105 1428660 261 1917 18 0% 0 0 3
fannkuchredux (click) 133649 102815 7 192 0 0% 0 0 0
lee (click) 343889 271318 45 586 70 11% 0 0 12
nbody (click) 128721 98923 9 154 0 0% 0 0 0
optcarrot (click) 455953 404553 197 3571 20 0% 0 0 0
rubykon (click) 262289 214063 139 1555 2 0% 0 0 0
30k_ifelse (click) 5507985 4311717 9262 57800 0 0% 0 0 0
30k_methods (click) 2123665 1620508 5781 19357 0 0% 0 0 0
cfunc_itself (click) 117905 90351 7 45 0 0% 0 0 0
fib (click) 116497 89959 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) 117713 90665 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.