YJIT Benchmarks

Details for Benchmarks at 2021-11-17 19:11:23

Overall YJIT is 28.0% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 18.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 25 174 25 161 25 151 25 251
hexapdf 25 15 25 15 25 15
liquid-render 25 145 25 162 25 157 25 234
mail 25 165 25 175 25 158 25 186
psych-load 25 15 25 15 25 15 25 15
railsbench 25 15 25 15 25 15 25 15
binarytrees 25 59 25 104 25 94 25 81
fannkuchredux 25 15 25 15 25 15 25 15
jekyll 25 15 25 15 25 15 25 15
lee 25 15 25 15 25 15 25 15
nbody 25 248 25 466 25 483 25 374
optcarrot 25 15 25 15 25 15 25 15
rubykon 25 15 25 15 25 15 25 15
30k_ifelse 25 15 25 15 25 15 25 68
30k_methods 25 15 25 15 25 15 25 15
cfunc_itself 25 310 25 480 25 440 25 734
fib 25 132 25 473 25 454 25 552
getivar 25 318 25 307 25 322 25 808
keyword_args 25 103 25 137 25 133 25 634
respond_to 25 106 25 139 25 128 25 168
setivar 25 397 25 415 25 413 25 790

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) 967338 677715 184 1169 0 0% 0 0 0
hexapdf (click) 1082474 809571 595 8010 615 7% 0 0 320
liquid-render (click) 470391 343034 143 1461 95 6% 0 0 1
mail (click) 877290 603649 339 5453 124 2% 0 0 39
psych-load (click) 296993 211301 57 436 1 0% 0 0 0
railsbench (click) 2586786 1796868 1295 9683 263 2% 0 0 26
binarytrees (click) 113637 80936 9 48 0 0% 0 0 0
fannkuchredux (click) 128741 92269 6 202 0 0% 0 0 0
jekyll (click) 1890026 1393873 336 3971 179 4% 0 0 0
lee (click) 344810 239379 44 566 70 12% 0 0 12
nbody (click) 122149 87094 8 148 0 0% 0 0 0
optcarrot (click) 452005 381471 196 3566 20 0% 0 0 0
rubykon (click) 254501 196852 138 1523 1 0% 0 0 0
30k_ifelse (click) 5502821 4301260 9261 57794 0 0% 0 0 0
30k_methods (click) 2117029 1609045 5780 19351 0 0% 0 0 0
cfunc_itself (click) 111333 78888 6 39 0 0% 0 0 0
fib (click) 109797 78496 6 28 0 0% 0 0 0
getivar (click) 112101 81356 6 55 0 0% 0 0 0
keyword_args (click) 112165 79529 7 41 0 0% 0 0 0
respond_to (click) 113445 80222 6 54 0 0% 0 0 0
setivar (click) 111461 79531 6 28 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.