YJIT Benchmarks

Details for Benchmarks at 2022-09-22 20:11:35

Overall YJIT is 37.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 34.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 MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 182 75 182 20 182
hexapdf 5 15 20 15
liquid-render 5 170 75 170 20 170
mail 5 130 75 130 20 130
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 85 75 85 20 85
chunky_png 5 30 75 30 20 30
erubi 5 66 75 66 20 66
erubi_rails 5 1050 75 1050 20 1050
fannkuchredux 5 15 55 15 20 15
lee 5 21 75 21 20 21
nbody 5 264 75 264 20 264
optcarrot 5 15 75 15 20 15
rubykon 5 15 31 15 20 15
30k_ifelse 5 56 65 56 20 56
30k_methods 5 24 22 24 20 24
cfunc_itself 5 408 75 408 20 408
fib 5 318 75 318 20 318
getivar 5 467 75 467 20 467
keyword_args 5 367 75 367 20 367
respond_to 5 666 75 666 20 666
setivar 5 491 75 491 20 491
str_concat 5 498 75 498 20 498

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) 1067511 777692 131 1278 0 0% 0 0 0
hexapdf (click) 1175031 917748 682 8037 9 0% 0 0 0
liquid-render (click) 522743 397190 150 1670 2 0% 0 0 0
mail (click) 933111 651203 374 5421 17 0% 0 0 0
psych-load (click) 356343 261346 68 482 1 0% 0 0 0
railsbench (click) 2724983 1959065 1436 9995 16 0% 0 0 0
binarytrees (click) 176951 127656 13 64 0 0% 0 0 0
chunky_png (click) 397047 287671 88 998 0 0% 0 0 0
erubi (click) 341239 250855 10 79 0 0% 0 0 0
erubi_rails (click) 2020919 1427984 300 2026 4 0% 0 0 0
fannkuchredux (click) 189687 136560 10 196 0 0% 0 0 0
lee (click) 396023 288536 58 634 0 0% 0 0 0
nbody (click) 186807 135987 12 171 0 0% 0 0 0
optcarrot (click) 531383 441228 207 3590 20 0% 0 0 0
rubykon (click) 330039 255799 144 1582 1 0% 0 0 0
30k_ifelse (click) 5663991 4347210 9265 57804 0 0% 0 0 0
30k_methods (click) 2208631 1656075 5784 19361 0 0% 0 0 0
cfunc_itself (click) 174199 125565 10 49 0 0% 0 0 0
fib (click) 172855 125526 10 38 0 0% 0 0 0
getivar (click) 174327 127260 10 65 0 0% 0 0 0
keyword_args (click) 174903 126206 11 51 0 0% 0 0 0
respond_to (click) 174455 126779 10 64 0 0% 0 0 0
setivar (click) 174263 126080 10 38 0 0% 0 0 0
str_concat (click) 174199 126412 12 62 0 0% 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.