YJIT Benchmarks

Details for Benchmarks at 2021-12-06 19:10:08

Overall YJIT is 30.0% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 23.6% 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 177 20 177 75 177 20 177
hexapdf 5 15 20 15 20 15
liquid-render 5 167 20 167 75 167 20 167
mail 5 138 20 138 75 138 20 138
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 88 20 88 75 88 20 88
erubi 5 50 20 50 75 50 20 50
erubi_rails 5 561 20 561 75 561 20 561
fannkuchredux 5 15 20 15 53 15 20 15
jekyll 5 15 20 15 35 15 20 15
lee 5 25 20 25 75 25 20 25
nbody 5 341 20 341 75 341 20 341
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 42 15 20 15
30k_ifelse 5 64 20 64 66 64 20 64
30k_methods 5 26 20 26 41 26 20 26
cfunc_itself 5 512 20 512 75 512 20 512
fib 5 376 20 376 75 376 20 376
getivar 5 562 20 562 75 562 20 562
keyword_args 5 440 20 440 75 440 20 440
respond_to 5 126 20 126 75 126 20 126
setivar 5 481 20 481 75 481 20 481

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) 988650 757363 185 1194 0 0% 0 0 0
hexapdf (click) 1095338 897382 595 7996 616 7% 0 0 321
liquid-render (click) 492613 391170 143 1454 95 6% 0 0 1
mail (click) 871338 652061 325 5224 124 2% 0 0 39
psych-load (click) 311393 246680 57 436 1 0% 0 0 0
railsbench (click) 2519714 1914940 1295 9264 263 2% 0 0 26
binarytrees (click) 163251 127162 9 49 0 0% 0 0 0
erubi (click) 289441 229115 8 35 0 0% 0 0 0
erubi_rails (click) 2461026 1783529 260 1989 17 0% 0 0 3
fannkuchredux (click) 179059 139039 6 203 0 0% 0 0 0
jekyll (click) 1876906 1517728 336 3770 186 4% 0 0 0
lee (click) 349418 276500 44 562 67 11% 0 0 12
nbody (click) 172531 134400 8 149 0 0% 0 0 0
optcarrot (click) 501939 449595 196 3567 20 0% 0 0 0
rubykon (click) 304371 249066 138 1523 1 0% 0 0 0
30k_ifelse (click) 5552883 4367802 9261 57795 0 0% 0 0 0
30k_methods (click) 2174643 1658662 5780 19394 0 0% 0 0 0
cfunc_itself (click) 161715 125658 6 40 0 0% 0 0 0
fib (click) 160755 125655 6 29 0 0% 0 0 0
getivar (click) 161907 127977 6 56 0 0% 0 0 0
keyword_args (click) 162547 126299 7 42 0 0% 0 0 0
respond_to (click) 163827 127152 6 55 0 0% 0 0 0
setivar (click) 161843 126301 6 29 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.