YJIT Benchmarks

Details for Benchmarks at 2022-11-10 04:20:37

Overall YJIT is 34.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 35.8% 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 205 5 205
hexapdf 5 15 5 15
liquid-render 5 174 5 174
mail 5 127 5 127
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 236 5 236
binarytrees 5 86 5 86
chunky_png 5 32 5 32
erubi 5 67 5 67
erubi_rails 5 1140 5 1140
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 256 5 256
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 495 5 495
fib 5 326 5 326
getivar 5 426 5 426
keyword_args 5 387 5 387
respond_to 5 701 5 701
setivar 5 425 5 425
str_concat 5 460 5 460

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) 2323177 2321047 25 359 6 1% 0 0 0
hexapdf (click) 1797531 1796036 819 10256 189 1% 0 0 0
liquid-render (click) 596400 594269 156 1839 34 1% 0 0 0
mail (click) 1345328 1344418 373 5120 176 3% 0 0 0
psych-load (click) 813755 812629 70 628 19 3% 0 0 0
railsbench (click) 5678747 5677017 1779 13924 484 3% 0 0 0
ruby-lsp (click) 5628986 5627320 6425 41589 1524 3% 12204 0 0
binarytrees (click) 135337 133891 16 134 4 2% 0 0 0
chunky_png (click) 829045 828371 89 1168 31 2% 0 0 0
erubi (click) 752256 750097 13 142 4 2% 0 0 0
erubi_rails (click) 4773842 4773440 329 2701 111 4% 0 0 0
etanni (click) 137682 135667 13 102 4 3% 0 0 0
fannkuchredux (click) 147370 147348 13 264 4 1% 0 0 0
lee (click) 835412 835158 79 804 25 3% 0 0 0
nbody (click) 149991 148933 15 243 6 2% 0 0 0
optcarrot (click) 569856 568254 203 4069 93 2% 0 0 0
rubykon (click) 285135 283108 145 1634 32 1% 0 0 0
30k_ifelse (click) 5419417 5419293 9268 57191 4 0% 0 0 0
30k_methods (click) 2095283 2092887 5787 19420 4 0% 0 0 0
cfunc_itself (click) 133238 132335 13 117 4 3% 0 0 0
fib (click) 131774 131305 13 106 4 3% 0 0 0
getivar (click) 133856 132729 13 133 4 3% 0 0 0
keyword_args (click) 134030 132897 14 119 4 3% 0 0 0
respond_to (click) 133754 132729 13 133 5 3% 0 0 0
setivar (click) 134015 132897 13 106 4 3% 0 0 0
str_concat (click) 133468 132561 15 132 6 4% 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.