YJIT Benchmarks

Details for Benchmarks at 2022-10-04 20:10:49

Overall YJIT is 30.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 31.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 YJIT warmups YJIT iters
activerecord 5 196 20 196
hexapdf 5 15 20 15
liquid-render 5 171 20 171
mail 5 129 20 129
psych-load 5 15 20 15
railsbench 5 15 20 15
binarytrees 5 84 20 84
chunky_png 5 29 20 29
erubi 5 67 20 67
erubi_rails 5 1053 20 1053
fannkuchredux 5 15 20 15
lee 5 20 20 20
nbody 5 262 20 262
optcarrot 5 15 20 15
rubykon 5 15 20 15
30k_ifelse 5 55 20 55
30k_methods 5 25 20 25
cfunc_itself 5 428 20 428
fib 5 313 20 313
getivar 5 467 20 467
keyword_args 5 359 20 359
respond_to 5 632 20 632
setivar 5 490 20 490
str_concat 5 492 20 492

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) 2419153 1501059 23 253 6 2% 0 0 0
hexapdf (click) 1875155 1376548 872 9368 181 1% 0 0 0
liquid-render (click) 742739 513459 154 1660 34 2% 0 0 0
mail (click) 1461523 979645 385 4866 174 3% 0 0 0
psych-load (click) 938387 627206 68 434 18 4% 0 0 0
railsbench (click) 5300433 3389767 1784 12220 468 3% 0 0 0
binarytrees (click) 318163 203226 14 70 4 5% 0 0 0
chunky_png (click) 961171 647560 87 1023 31 3% 0 0 0
erubi (click) 875411 590623 11 76 4 5% 0 0 0
erubi_rails (click) 4384273 2718377 327 2373 104 4% 0 0 0
fannkuchredux (click) 326611 210004 11 200 4 2% 0 0 0
lee (click) 959635 650096 80 744 25 3% 0 0 0
nbody (click) 333587 215643 13 179 6 3% 0 0 0
optcarrot (click) 757459 594502 201 3773 93 2% 0 0 0
rubykon (click) 471763 331999 143 1571 32 2% 0 0 0
30k_ifelse (click) 5625491 4415043 9266 57127 4 0% 0 0 0
30k_methods (click) 2276499 1730783 5785 19356 4 0% 0 0 0
cfunc_itself (click) 315603 201078 11 53 4 7% 0 0 0
fib (click) 314131 200761 11 42 4 9% 0 0 0
getivar (click) 317011 203612 11 69 4 5% 0 0 0
keyword_args (click) 312723 199420 12 55 4 7% 0 0 0
respond_to (click) 311315 199214 11 55 5 9% 0 0 0
setivar (click) 316883 202232 11 42 4 9% 0 0 0
str_concat (click) 315859 201927 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.