YJIT Benchmarks

Details for Benchmarks at 2022-10-10 04:40:38

Overall YJIT is 35.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 28.5% 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 YJIT warmups YJIT iters
activerecord 5 192 5 192
hexapdf 5 15 5 15
liquid-render 5 175 5 175
mail 5 129 5 129
psych-load 5 15 5 15
railsbench 5 15 5 15
binarytrees 5 84 5 84
chunky_png 5 31 5 31
erubi 5 67 5 67
erubi_rails 5 1014 5 1014
fannkuchredux 5 15 5 15
lee 5 20 5 20
nbody 5 217 5 217
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 57 5 57
30k_methods 5 24 5 24
cfunc_itself 5 456 5 456
fib 5 324 5 324
getivar 5 467 5 467
keyword_args 5 372 5 372
respond_to 5 668 5 668
setivar 5 420 5 420
str_concat 5 469 5 469

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) 2483729 1544387 23 274 6 2% 0 0 0
hexapdf (click) 1884947 1383744 872 9345 181 1% 0 0 0
liquid-render (click) 748627 517891 154 1661 34 2% 0 0 0
mail (click) 1473555 987467 385 4878 174 3% 0 0 0
psych-load (click) 933267 624015 67 433 18 4% 0 0 0
railsbench (click) 5389905 3445569 1784 12466 470 3% 0 0 0
binarytrees (click) 317715 202966 14 70 4 5% 0 0 0
chunky_png (click) 953299 643313 87 1022 31 3% 0 0 0
erubi (click) 890195 600267 11 76 4 5% 0 0 0
erubi_rails (click) 4470097 2766545 327 2429 104 4% 0 0 0
fannkuchredux (click) 323219 208313 11 200 4 2% 0 0 0
lee (click) 975699 660690 80 744 25 3% 0 0 0
nbody (click) 330451 214125 13 179 6 3% 0 0 0
optcarrot (click) 756499 593913 201 3773 93 2% 0 0 0
rubykon (click) 472019 332825 143 1572 31 1% 0 0 0
30k_ifelse (click) 5620371 4411826 9266 57127 4 0% 0 0 0
30k_methods (click) 2268691 1726308 5785 19356 4 0% 0 0 0
cfunc_itself (click) 315155 200818 11 53 4 7% 0 0 0
fib (click) 313427 200328 11 42 4 9% 0 0 0
getivar (click) 312083 200511 11 69 4 5% 0 0 0
keyword_args (click) 312723 199872 12 55 4 7% 0 0 0
respond_to (click) 311827 199995 11 55 5 9% 0 0 0
setivar (click) 308819 197584 11 42 4 9% 0 0 0
str_concat (click) 315411 201667 13 68 6 8% 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.