YJIT Benchmarks

Details for Benchmarks at 2022-10-20 04:34:24

Overall YJIT is 37.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.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 YJIT warmups YJIT iters
activerecord 5 196 5 196
hexapdf 5 15 5 15
liquid-render 5 177 5 177
mail 5 128 5 128
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 1061 5 1061
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 20 5 20
nbody 5 245 5 245
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 50 5 50
30k_methods 5 20 5 20
cfunc_itself 5 498 5 498
fib 5 329 5 329
getivar 5 426 5 426
keyword_args 5 386 5 386
respond_to 5 715 5 715
setivar 5 424 5 424
str_concat 5 412 5 412

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) 4673226 4680232 23 316 6 1% 0 0 0
hexapdf (click) 3640298 3647435 817 9675 189 1% 0 0 0
liquid-render (click) 1414157 1420509 154 1741 34 1% 0 0 0
mail (click) 2835292 2843057 371 4957 176 3% 0 0 0
psych-load (click) 1777111 1783368 68 490 19 3% 0 0 0
railsbench (click) 10211967 10218638 1777 12809 475 3% 0 0 0
binarytrees (click) 590465 598351 14 70 4 5% 0 0 0
chunky_png (click) 1826767 1832637 87 1041 31 2% 0 0 0
erubi (click) 1689162 1696880 11 78 4 5% 0 0 0
erubi_rails (click) 8455328 8463153 327 2464 107 4% 0 0 0
etanni (click) 578237 584271 11 38 4 10% 0 0 0
fannkuchredux (click) 606853 614735 11 200 4 2% 0 0 0
lee (click) 1840834 1847375 77 746 25 3% 0 0 0
nbody (click) 612932 619097 13 179 6 3% 0 0 0
optcarrot (click) 1458234 1466374 201 4001 93 2% 0 0 0
rubykon (click) 885484 893263 143 1550 32 2% 0 0 0
30k_ifelse (click) 11165304 11171339 9266 57127 4 0% 0 0 0
30k_methods (click) 4509288 4516285 5785 19356 4 0% 0 0 0
cfunc_itself (click) 579360 584858 11 53 4 7% 0 0 0
fib (click) 577901 584541 11 42 4 9% 0 0 0
getivar (click) 579980 586390 11 69 4 5% 0 0 0
keyword_args (click) 580573 585804 12 55 4 7% 0 0 0
respond_to (click) 578702 585293 11 55 5 9% 0 0 0
setivar (click) 580147 585660 11 42 4 9% 0 0 0
str_concat (click) 579567 585755 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.