YJIT Benchmarks

Details for Benchmarks at 2022-12-06 20:10:07

Overall YJIT is 37.7% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 38.9% 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 194 5 194
hexapdf 5 15 5 15
liquid-render 5 156 5 156
mail 5 139 5 139
psych-load 5 15 5 15
railsbench 5 15 5 15
ruby-lsp 5 278 5 278
binarytrees 5 85 5 85
chunky_png 5 32 5 32
erubi 5 68 5 68
erubi_rails 5 1122 5 1122
etanni 5 42 5 42
fannkuchredux 5 21 5 21
lee 5 22 5 22
nbody 5 269 5 269
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 50 5 50
30k_methods 5 21 5 21
cfunc_itself 5 497 5 497
fib 5 327 5 327
getivar 5 438 5 438
keyword_args 5 379 5 379
respond_to 5 708 5 708
setivar 5 1359 5 1359
setivar_object 15 15 15 15
str_concat 5 444 5 444

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) 2273024 2271526 25 372 6 1% 0 0 0
hexapdf (click) 1708810 1707122 820 10235 216 2% 0 0 0
liquid-render (click) 584851 583729 156 1849 33 1% 0 0 0
mail (click) 1252728 1252619 373 4666 176 3% 0 0 0
psych-load (click) 785101 783234 70 651 19 2% 0 0 0
railsbench (click) 5511427 5510779 1779 14235 482 3% 0 0 0
ruby-lsp (click) 5353408 5351376 6428 41465 1524 3% 14254 0 0
binarytrees (click) 123851 123320 16 140 4 2% 0 0 0
chunky_png (click) 804554 803936 89 1174 31 2% 0 0 0
erubi (click) 732681 731644 13 147 4 2% 0 0 0
erubi_rails (click) 4646840 4645488 329 2785 111 3% 0 0 0
etanni (click) 124636 124161 13 108 4 3% 0 0 0
fannkuchredux (click) 136052 134664 14 273 4 1% 0 0 0
lee (click) 809164 807531 79 812 25 3% 0 0 0
nbody (click) 143845 142438 15 245 6 2% 0 0 0
optcarrot (click) 563064 561272 203 4439 93 2% 0 0 0
rubykon (click) 262779 262397 145 1628 31 1% 0 0 0
30k_ifelse (click) 5269519 5267481 9268 57168 4 0% 0 0 0
30k_methods (click) 2028160 2026418 5787 19427 4 0% 0 0 0
cfunc_itself (click) 121767 119874 13 123 4 3% 0 0 0
fib (click) 120344 118701 13 112 4 3% 0 0 0
getivar (click) 129334 127585 13 139 4 2% 0 0 0
keyword_args (click) 122550 120233 14 125 4 3% 0 0 0
respond_to (click) 122361 120195 13 140 5 3% 0 0 0
setivar (click) 121154 119399 13 119 4 3% 0 0 0
setivar_object (click) 121489 119663 13 119 4 3% 0 0 0
str_concat (click) 129241 127585 15 138 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.