YJIT Benchmarks

Details for Benchmarks at 2022-10-15 04:39:03

Overall YJIT is 38.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 30.4% 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 201 5 201
hexapdf 5 15 5 15
liquid-render 5 177 5 177
mail 5 127 5 127
psych-load 5 15 5 15
railsbench 5 15 5 15
binarytrees 5 86 5 86
chunky_png 5 31 5 31
erubi 5 66 5 66
erubi_rails 5 1058 5 1058
etanni 5 41 5 41
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 244 5 244
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 56 5 56
30k_methods 5 24 5 24
cfunc_itself 5 491 5 491
fib 5 327 5 327
getivar 5 426 5 426
keyword_args 5 355 5 355
respond_to 5 711 5 711
setivar 5 425 5 425
str_concat 5 402 5 402

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) 2486033 1477972 23 283 6 2% 0 0 0
hexapdf (click) 1906259 1301506 817 9623 189 1% 0 0 0
liquid-render (click) 744275 487648 154 1737 34 1% 0 0 0
mail (click) 1484691 954519 371 4915 176 3% 0 0 0
psych-load (click) 950355 610883 68 489 19 3% 0 0 0
railsbench (click) 5424593 3313880 1777 12824 475 3% 0 0 0
binarytrees (click) 313107 194979 14 70 4 5% 0 0 0
chunky_png (click) 967251 627482 87 1034 31 2% 0 0 0
erubi (click) 898387 583106 11 78 4 5% 0 0 0
erubi_rails (click) 4497553 2665677 327 2484 107 4% 0 0 0
etanni (click) 318483 197774 11 38 4 10% 0 0 0
fannkuchredux (click) 330323 207310 11 200 4 2% 0 0 0
lee (click) 967891 629896 77 746 25 3% 0 0 0
nbody (click) 333971 208770 13 179 6 3% 0 0 0
optcarrot (click) 759443 545436 201 4001 93 2% 0 0 0
rubykon (click) 467411 311728 143 1549 32 2% 0 0 0
30k_ifelse (click) 5603155 4343885 9266 57127 4 0% 0 0 0
30k_methods (click) 2277011 1726096 5785 19356 4 0% 0 0 0
cfunc_itself (click) 314835 195444 11 53 4 7% 0 0 0
fib (click) 313363 195127 11 42 4 9% 0 0 0
getivar (click) 315795 197311 11 69 4 5% 0 0 0
keyword_args (click) 315923 196397 12 55 4 7% 0 0 0
respond_to (click) 314195 195879 11 55 5 9% 0 0 0
setivar (click) 315603 196269 11 42 4 9% 0 0 0
str_concat (click) 315091 196293 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.