YJIT Benchmarks

Details for Benchmarks at 2022-03-05 19:12:24

Overall YJIT is 30.7% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 27.9% 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 MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 180 75 180 20 180
hexapdf 5 15 20 15
liquid-render 5 152 75 152 20 152
mail 5 123 75 123 20 123
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 64 75 64 20 64
discourse 5 36 75 36 20 36
erubi 5 47 75 47 20 47
erubi_rails 5 977 75 977 20 977
fannkuchredux 5 15 75 15 20 15
lee 5 22 75 22 20 22
nbody 5 282 75 282 20 282
optcarrot 5 15 75 15 20 15
rubykon 5 15 37 15 20 15
30k_ifelse 5 56 75 56 20 56
30k_methods 5 22 29 22 20 22
cfunc_itself 5 440 75 440 20 440
fib 5 319 75 319 20 319
getivar 5 794 75 794 20 794
keyword_args 5 375 75 375 20 375
respond_to 5 101 75 101 20 101
setivar 5 1799 75 1799 20 1799

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) 989969 759319 185 1199 0 0% 0 0 0
hexapdf (click) 1115153 913414 600 8178 613 7% 0 0 320
liquid-render (click) 486225 386050 143 1505 95 6% 0 0 1
mail (click) 899601 673374 325 5539 125 2% 0 0 39
psych-load (click) 329617 260491 59 434 1 0% 0 0 0
railsbench (click) 2533137 1930238 1297 9346 268 2% 0 0 26
binarytrees (click) 150801 115689 11 59 0 0% 0 0 0
discourse (click) 23231697 11578021 3094 294479 271238 92% 2 0 133
erubi (click) 318033 250745 10 79 0 0% 0 0 0
erubi_rails (click) 1904593 1434620 262 1874 18 0% 0 0 3
fannkuchredux (click) 156369 118785 8 189 0 0% 0 0 0
lee (click) 371665 292874 45 587 69 11% 0 0 12
nbody (click) 160209 123003 10 159 0 0% 0 0 0
optcarrot (click) 487441 428633 198 3576 20 0% 0 0 0
rubykon (click) 291921 235865 140 1532 1 0% 0 0 0
30k_ifelse (click) 5539985 4336126 9263 57805 0 0% 0 0 0
30k_methods (click) 2155153 1644588 5782 19362 0 0% 0 0 0
cfunc_itself (click) 141073 106716 8 50 0 0% 0 0 0
fib (click) 147985 114039 8 39 0 0% 0 0 0
getivar (click) 149585 116437 8 66 0 0% 0 0 0
keyword_args (click) 150161 114959 9 52 0 0% 0 0 0
respond_to (click) 151569 115885 8 65 0 0% 0 0 0
setivar (click) 141393 107359 8 39 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.