YJIT Benchmarks

Details for Benchmarks at 2022-01-06 19:12:47

Overall YJIT is 29.8% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.1% 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 182 20 182 75 182 20 182
hexapdf 5 15 20 15 20 15
liquid-render 5 170 20 170 75 170 20 170
mail 5 136 20 136 75 136 20 136
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 52 20 52 75 52 20 52
erubi_rails 5 974 20 974 75 974 20 974
fannkuchredux 5 15 20 15 53 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 43 15 20 15
30k_ifelse 5 65 20 65 62 65 20 65
30k_methods 5 26 20 26 41 26 20 26
cfunc_itself 5 476 20 476 75 476 20 476
fib 5 383 20 383 75 383 20 383
getivar 5 563 20 563 75 563 20 563
keyword_args 5 425 20 425 75 425 20 425
respond_to 5 122 20 122 75 122 20 122
setivar 5 508 20 508 75 508 20 508

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) 971163 739539 185 1198 0 0% 0 0 0
hexapdf (click) 1117531 911130 599 8111 620 7% 0 0 321
liquid-render (click) 472283 371686 144 1470 95 6% 0 0 1
mail (click) 866331 640388 326 5456 124 2% 0 0 39
psych-load (click) 302427 235540 59 433 1 0% 0 0 0
railsbench (click) 2511899 1898357 1296 9270 266 2% 0 0 26
binarytrees (click) 113179 86269 10 53 0 0% 0 0 0
erubi (click) 272923 213164 9 40 0 0% 0 0 0
erubi_rails (click) 1901083 1420502 261 1983 16 0% 0 0 3
fannkuchredux (click) 129179 98279 7 207 0 0% 0 0 0
lee (click) 331099 259418 45 567 71 12% 0 0 12
nbody (click) 122587 93470 9 153 0 0% 0 0 0
optcarrot (click) 451803 399282 197 3571 20 0% 0 0 0
rubykon (click) 254363 206080 139 1525 2 0% 0 0 0
30k_ifelse (click) 5502299 4306593 9262 57799 0 0% 0 0 0
30k_methods (click) 2117467 1615055 5781 19356 0 0% 0 0 0
cfunc_itself (click) 111771 84898 7 44 0 0% 0 0 0
fib (click) 110747 84835 7 33 0 0% 0 0 0
getivar (click) 111963 87017 7 60 0 0% 0 0 0
keyword_args (click) 112603 85539 8 46 0 0% 0 0 0
respond_to (click) 114011 86465 7 59 0 0% 0 0 0
setivar (click) 112027 85654 7 33 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.