YJIT Benchmarks

Details for Benchmarks at 2022-01-23 19:11:52

Overall YJIT is 28.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 25.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 180 20 180 75 180 20 180
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 86 20 86 75 86 20 86
erubi 5 55 20 55 75 55 20 55
erubi_rails 5 1023 20 1023 75 1023 20 1023
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 65 20 65 73 65 20 65
30k_methods 5 27 20 27 44 27 20 27
cfunc_itself 5 516 20 516 75 516 20 516
fib 5 384 20 384 75 384 20 384
getivar 5 952 20 952 75 952 20 952
keyword_args 5 454 20 454 75 454 20 454
respond_to 5 126 20 126 75 126 20 126
setivar 5 2188 20 2188 75 2188 20 2188

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) 974225 747335 185 1198 0 0% 0 0 0
hexapdf (click) 1101585 902952 599 8163 614 7% 0 0 321
liquid-render (click) 478161 379922 143 1533 95 6% 0 0 1
mail (click) 879569 659266 324 5483 124 2% 0 0 39
psych-load (click) 306897 243495 58 428 1 0% 0 0 0
railsbench (click) 2516369 1917635 1297 9339 268 2% 0 0 26
binarytrees (click) 119441 91722 10 54 0 0% 0 0 0
erubi (click) 301329 240188 9 73 0 0% 0 0 0
erubi_rails (click) 1898897 1429668 261 1940 18 0% 0 0 3
fannkuchredux (click) 132689 102091 7 184 0 0% 0 0 0
lee (click) 344465 271672 45 586 70 11% 0 0 12
nbody (click) 128209 98594 9 154 0 0% 0 0 0
optcarrot (click) 455953 404553 197 3571 20 0% 0 0 0
rubykon (click) 260945 212486 140 1534 1 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) 117393 90022 7 45 0 0% 0 0 0
fib (click) 115985 89630 7 34 0 0% 0 0 0
getivar (click) 117713 92141 7 61 0 0% 0 0 0
keyword_args (click) 118801 90992 8 47 0 0% 0 0 0
respond_to (click) 119569 91476 7 60 0 0% 0 0 0
setivar (click) 117841 90778 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.