YJIT Benchmarks

Details for Benchmarks at 2023-08-17 06:08:12

Overall YJIT is 60.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 62.5% 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 30 462 30 462
chunky-png 30 31 30 31
erubi-rails 30 1402 30 1402
hexapdf 30 15 30 15
liquid-c 30 347 30 347
liquid-compile 30 357 30 357
liquid-render 30 237 30 237
lobsters 30 22 30 22
mail 30 156 30 156
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 388 30 388
sequel 30 305 30 305
binarytrees 30 87 30 87
erubi 30 76 30 76
etanni 30 51 30 51
fannkuchredux 30 26 30 26
fluentd 30 15 30 15
lee 30 21 30 21
nbody 30 271 30 271
optcarrot 30 15 30 15
rack 30 181 30 181
ruby-json 30 15 30 15
rubykon 30 15 30 15
30k_ifelse 30 56 30 56
30k_methods 30 23 30 23
cfunc_itself 30 544 30 544
fib 30 448 30 448
getivar 30 939 30 939
keyword_args 30 433 30 433
respond_to 30 798 30 798
setivar 30 1665 30 1665
setivar_object 30 475 30 475
setivar_young 30 474 30 474
str_concat 30 454 30 454
throw 30 705 30 705

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) 803298 737231 51 516 1 0% 0 0 0
chunky-png (click) 300694 297902 86 1080 1 0% 0 0 0
erubi-rails (click) 1923826 1654735 288 2904 1 0% 0 0 0
hexapdf (click) 1389090 1318019 600 11978 22 0% 0 0 0
liquid-c (click) 481409 476558 125 1663 3 0% 0 0 0
liquid-compile (click) 363184 354112 150 2072 2 0% 0 0 0
liquid-render (click) 530169 515964 146 2124 9 0% 0 0 0
lobsters (click) 8592146 7320700 3250 47532 55 0% 0 0 0
mail (click) 719770 663796 347 4837 9 0% 0 0 0
psych-load (click) 267112 255230 64 598 1 0% 0 0 0
railsbench (click) 2697926 2413812 1359 12222 11 0% 0 0 0
ruby-lsp (click) 5847266 5455992 3420 51317 392 0% 4 0 0
sequel (click) 446694 439642 16 122 0 0% 0 0 0
binarytrees (click) 8984 7526 11 75 0 0% 0 0 0
erubi (click) 236512 228192 9 83 0 0% 0 0 0
etanni (click) 29396 27360 11 77 0 0% 0 0 0
fannkuchredux (click) 19508 20418 8 219 0 0% 0 0 0
fluentd (click) 377873 334800 12 105 0 0% 0 0 0
lee (click) 280685 275706 49 705 0 0% 0 0 0
nbody (click) 16636 16665 10 178 0 0% 0 0 0
optcarrot (click) 327183 393652 197 4500 22 0% 0 0 0
rack (click) 235643 230220 30 290 0 0% 0 0 0
ruby-json (click) 25560 22379 11 191 0 0% 0 0 0
rubykon (click) 128800 135623 145 1493 2 0% 0 0 0
30k_ifelse (click) 5410784 4368416 9263 50806 0 0% 0 0 0
30k_methods (click) 1981346 1528614 5781 19360 0 0% 0 0 0
cfunc_itself (click) 6328 4985 8 61 0 0% 0 0 0
fib (click) 4858 4492 8 49 0 0% 0 0 0
getivar (click) 6004 6018 8 74 0 0% 0 0 0
keyword_args (click) 7103 5579 9 63 0 0% 0 0 0
respond_to (click) 6864 7099 8 76 0 0% 0 0 0
setivar (click) 5155 4579 8 54 0 0% 0 0 0
setivar_object (click) 5493 4599 8 54 0 0% 0 0 0
setivar_young (click) 6279 5575 9 62 0 0% 0 0 0
str_concat (click) 6732 6388 10 76 0 0% 0 0 0
throw (click) 7548 5941 10 69 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.