YJIT Benchmarks

Details for Benchmarks at 2022-01-21 20:59:16

Overall YJIT is 31.0% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 23.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 198 20 198 75 198 20 198
hexapdf 5 15 20 15 20 15
liquid-render 5 180 20 180 75 180 20 180
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 90 20 90 75 90 20 90
erubi 5 55 20 55 75 55 20 55
erubi_rails 5 1062 20 1062 75 1062 20 1062
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 63 20 63 75 63 20 63
30k_methods 5 26 20 26 43 26 20 26
cfunc_itself 5 537 20 537 75 537 20 537
fib 5 384 20 384 75 384 20 384
getivar 5 943 20 943 75 943 20 943
keyword_args 5 454 20 454 75 454 20 454
respond_to 5 125 20 125 75 125 20 125
setivar 5 2175 20 2175 75 2175 20 2175

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) 974801 747781 185 1198 0 0% 0 0 0
hexapdf (click) 1101393 903062 599 8165 615 7% 0 0 321
liquid-render (click) 475793 378221 143 1507 95 6% 0 0 1
mail (click) 880657 660282 324 5479 124 2% 0 0 39
psych-load (click) 306769 243382 58 428 1 0% 0 0 0
railsbench (click) 2513681 1916869 1297 9308 268 2% 0 0 26
binarytrees (click) 118929 91393 10 54 0 0% 0 0 0
erubi (click) 301329 240188 9 73 0 0% 0 0 0
erubi_rails (click) 1900497 1430906 261 1957 18 0% 0 0 3
fannkuchredux (click) 134161 103144 7 192 0 0% 0 0 0
lee (click) 344401 271647 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) 259281 211161 139 1519 2 0% 0 0 0
30k_ifelse (click) 5507985 4311717 9262 57800 0 0% 0 0 0
30k_methods (click) 2123281 1620292 5781 19357 0 0% 0 0 0
cfunc_itself (click) 117393 90022 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) 118801 90992 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.