YJIT Benchmarks

Details for Benchmarks at 2022-01-14 07:11:40

Overall YJIT is 31.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 31.0% 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 175 20 175 75 175 20 175
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 87 20 87 75 87 20 87
erubi 5 54 20 54 75 54 20 54
erubi_rails 5 1023 20 1023 75 1023 20 1023
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 25 20 25 75 25 20 25
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 62 20 62 75 62 20 62
30k_methods 5 27 20 27 42 27 20 27
cfunc_itself 5 525 20 525 75 525 20 525
fib 5 384 20 384 75 384 20 384
getivar 5 972 20 972 75 972 20 972
keyword_args 5 452 20 452 75 452 20 452
respond_to 5 122 20 122 75 122 20 122
setivar 5 2115 20 2115 75 2115 20 2115

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) 966865 741005 185 1198 0 0% 0 0 0
hexapdf (click) 1095313 897604 600 8170 612 7% 0 0 321
liquid-render (click) 473041 375837 143 1505 95 6% 0 0 1
mail (click) 875857 655578 325 5511 124 2% 0 0 39
psych-load (click) 295953 233924 58 428 1 0% 0 0 0
railsbench (click) 2511889 1913388 1297 9354 268 2% 0 0 26
binarytrees (click) 114065 87455 10 54 0 0% 0 0 0
erubi (click) 294737 234515 9 73 0 0% 0 0 0
erubi_rails (click) 1886225 1420549 261 1872 18 0% 0 0 3
fannkuchredux (click) 127889 98153 7 184 0 0% 0 0 0
lee (click) 337297 265642 45 586 72 12% 0 0 12
nbody (click) 123409 94656 9 154 0 0% 0 0 0
optcarrot (click) 450577 400286 197 3571 20 0% 0 0 0
rubykon (click) 255185 207664 139 1528 2 0% 0 0 0
30k_ifelse (click) 5503121 4307779 9262 57800 0 0% 0 0 0
30k_methods (click) 2118353 1616241 5781 19357 0 0% 0 0 0
cfunc_itself (click) 112529 86084 7 45 0 0% 0 0 0
fib (click) 111185 85692 7 34 0 0% 0 0 0
getivar (click) 112849 88203 7 61 0 0% 0 0 0
keyword_args (click) 113489 86725 8 47 0 0% 0 0 0
respond_to (click) 114769 87538 7 60 0 0% 0 0 0
setivar (click) 112849 86727 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.