YJIT Benchmarks

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

Overall YJIT is 35.3% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 32.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 192 5 192
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 88 5 88
chunky_png 5 30 5 30
erubi 5 66 5 66
erubi_rails 5 1005 5 1005
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 228 5 228
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 476 5 476
fib 5 319 5 319
getivar 5 467 5 467
keyword_args 5 371 5 371
respond_to 5 649 5 649
setivar 5 425 5 425
str_concat 5 477 5 477

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) 2477777 1539792 23 265 6 2% 0 0 0
hexapdf (click) 1888403 1385644 873 9358 181 1% 0 0 0
liquid-render (click) 746515 516977 154 1660 34 2% 0 0 0
mail (click) 1467283 983648 385 4861 174 3% 0 0 0
psych-load (click) 935059 625572 68 434 18 4% 0 0 0
railsbench (click) 5393297 3446861 1784 12469 470 3% 0 0 0
binarytrees (click) 317715 202966 14 70 4 5% 0 0 0
chunky_png (click) 959507 647023 87 1012 31 3% 0 0 0
erubi (click) 891091 601084 11 76 4 5% 0 0 0
erubi_rails (click) 4477777 2771470 327 2427 104 4% 0 0 0
fannkuchredux (click) 326675 210073 11 200 4 2% 0 0 0
lee (click) 972115 658945 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) 475091 334103 143 1568 32 2% 0 0 0
30k_ifelse (click) 5620371 4411826 9266 57127 4 0% 0 0 0
30k_methods (click) 2275539 1730194 5785 19356 4 0% 0 0 0
cfunc_itself (click) 315155 200818 11 53 4 7% 0 0 0
fib (click) 314195 200830 11 42 4 9% 0 0 0
getivar (click) 308947 198964 11 69 4 5% 0 0 0
keyword_args (click) 311763 198831 12 55 4 7% 0 0 0
respond_to (click) 307155 197038 11 55 5 9% 0 0 0
setivar (click) 312275 199344 11 42 4 9% 0 0 0
str_concat (click) 311251 199039 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.