YJIT Benchmarks

Details for Benchmarks at 2023-01-22 04:08:06

Overall YJIT is 36.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 37.6% 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 10 155 10 260
hexapdf 10 10 10 10
liquid-c 10 359 10 479
liquid-render 10 145 10 258
mail 10 168 10 199
psych-load 10 10 10 10
railsbench 10 10 10 10
ruby-lsp 10 343 10 384
sequel 10 176 10 191
binarytrees 10 54 10 118
chunky_png 10 22 10 39
erubi 10 90 10 110
erubi_rails 10 1149 10 1695
etanni 10 63 10 64
fannkuchredux 10 10 10 22
lee 10 14 10 23
nbody 10 220 10 408
optcarrot 10 10 10 10
rubykon 10 10 10 10
30k_ifelse 10 10 10 64
30k_methods 10 10 10 22
cfunc_itself 10 278 10 726
fib 10 114 10 479
getivar 10 240 10 647
keyword_args 10 96 10 568
respond_to 10 103 10 976
setivar 10 412 10 2030
setivar_object 10 243 10 622
str_concat 10 357 10 665

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) 2282122 2279988 22 410 8 1% 0 0 0
hexapdf (click) 1718254 1715926 819 10437 217 2% 0 0 0
liquid-c (click) 1122683 1122158 126 1491 34 2% 0 0 0
liquid-render (click) 565886 565294 156 1842 32 1% 0 0 0
mail (click) 1247212 1246192 373 4661 176 3% 0 0 0
psych-load (click) 782102 780626 70 651 19 2% 0 0 0
railsbench (click) 5529445 5528470 1779 14310 483 3% 0 0 0
ruby-lsp (click) 5373859 5372468 6428 41618 1537 3% 2154 0 0
sequel (click) 1454141 1452406 17 430 5 1% 0 0 0
binarytrees (click) 96452 94102 16 140 3 2% 0 0 0
chunky_png (click) 803183 802620 89 1188 31 2% 0 0 0
erubi (click) 740886 739508 13 149 4 2% 0 0 0
erubi_rails (click) 4666847 4666560 329 2840 111 3% 0 0 0
etanni (click) 144147 142294 13 108 3 2% 0 0 0
fannkuchredux (click) 107885 107242 14 273 3 1% 0 0 0
lee (click) 806374 804996 79 826 24 2% 0 0 0
nbody (click) 109125 108094 15 245 5 2% 0 0 0
optcarrot (click) 520808 518938 203 4449 92 2% 0 0 0
rubykon (click) 235955 233704 146 1644 30 1% 0 0 0
30k_ifelse (click) 5245189 5242908 9268 57200 3 0% 0 0 0
30k_methods (click) 1993463 1991910 5787 19427 3 0% 0 0 0
cfunc_itself (click) 93744 92254 13 123 3 2% 0 0 0
fib (click) 92325 91458 13 112 3 2% 0 0 0
getivar (click) 94088 92590 13 139 3 2% 0 0 0
keyword_args (click) 94528 92982 14 125 3 2% 0 0 0
respond_to (click) 94250 92738 13 139 4 2% 0 0 0
setivar (click) 93125 91870 13 119 3 2% 0 0 0
setivar_object (click) 93457 92018 13 119 3 2% 0 0 0
str_concat (click) 93983 92570 15 138 5 3% 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.