YJIT Benchmarks

Details for Benchmarks at 2022-10-12 04:37:25

Overall YJIT is 38.4% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 28.3% 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 191 5 191
hexapdf 5 15 5 15
liquid-render 5 174 5 174
mail 5 128 5 128
psych-load 5 15 5 15
railsbench 5 15 5 15
binarytrees 5 87 5 87
chunky_png 5 31 5 31
erubi 5 67 5 67
erubi_rails 5 984 5 984
etanni 15 15 15 15
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 215 5 215
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 474 5 474
fib 5 319 5 319
getivar 5 467 5 467
keyword_args 5 368 5 368
respond_to 5 611 5 611
setivar 5 398 5 398
str_concat 5 471 5 471

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) 2494737 1483093 23 283 6 2% 0 0 0
hexapdf (click) 1898707 1296798 873 9626 189 1% 0 0 0
liquid-render (click) 748627 491894 154 1741 34 1% 0 0 0
mail (click) 1484435 955336 385 4961 176 3% 0 0 0
psych-load (click) 946643 609257 68 489 19 3% 0 0 0
railsbench (click) 5416657 3310996 1784 12859 475 3% 0 0 0
binarytrees (click) 313683 196133 14 70 4 5% 0 0 0
chunky_png (click) 966803 627753 87 1032 31 3% 0 0 0
erubi (click) 899027 583987 11 78 4 5% 0 0 0
erubi_rails (click) 4489233 2660957 327 2466 107 4% 0 0 0
etanni (click) 317075 197184 11 38 4 10% 0 0 0
fannkuchredux (click) 326291 205539 11 200 4 2% 0 0 0
lee (click) 979155 638129 80 746 25 3% 0 0 0
nbody (click) 328275 205723 13 179 6 3% 0 0 0
optcarrot (click) 753619 542324 201 4001 93 2% 0 0 0
rubykon (click) 461459 308547 143 1562 32 2% 0 0 0
30k_ifelse (click) 5602067 4343607 9266 57127 4 0% 0 0 0
30k_methods (click) 2271507 1723296 5785 19356 4 0% 0 0 0
cfunc_itself (click) 314259 195470 11 53 4 7% 0 0 0
fib (click) 309331 193356 11 42 4 9% 0 0 0
getivar (click) 311571 195293 11 69 4 5% 0 0 0
keyword_args (click) 311571 194314 12 55 4 7% 0 0 0
respond_to (click) 310483 194420 11 55 5 9% 0 0 0
setivar (click) 311699 194563 11 42 4 9% 0 0 0
str_concat (click) 311379 194834 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.