YJIT Benchmarks

Details for Benchmarks at 2023-03-27 19:08:19 UTC

YJIT metrics from the yjit-bench suite using Ruby 466322ec6e

Overall YJIT is 49.4% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 52.2% faster than CRuby!

Performance on Headline Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower 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 467 30 467
hexapdf 30 15 30 15
liquid-c 30 344 30 344
liquid-render 30 190 30 190
mail 30 154 30 154
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 345 30 345
sequel 30 294 30 294
binarytrees 30 85 30 85
chunky_png 30 32 30 32
erubi 30 79 30 79
erubi_rails 30 1321 30 1321
etanni 30 48 30 48
fannkuchredux 30 23 30 23
lee 30 22 30 22
nbody 30 271 30 271
optcarrot 30 15 30 15
ruby-json 30 15 30 15
rubykon 30 15 30 15
setivar_young_object 30 428 30 428
30k_ifelse 30 47 30 47
30k_methods 30 21 30 21
cfunc_itself 30 474 30 474
fib 30 324 30 324
getivar 30 436 30 436
keyword_args 30 369 30 369
respond_to 30 648 30 648
setivar 30 1351 30 1351
setivar_object 30 411 30 411
str_concat 30 449 30 449
throw 30 870 30 870

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) 727088 724939 51 452 1 0% 0 0 0
hexapdf (click) 1196176 1196100 600 10667 22 0% 0 0 0
liquid-c (click) 426653 426376 125 1642 3 0% 0 0 0
liquid-render (click) 466197 463307 146 1991 8 0% 0 0 0
mail (click) 616606 615776 346 4511 9 0% 0 0 0
psych-load (click) 206045 205576 64 572 1 0% 0 0 0
railsbench (click) 2401757 2401656 1355 11361 7 0% 0 0 0
ruby-lsp (click) 5009420 5007992 3392 44180 310 0% 4 0 0
sequel (click) 626612 625188 15 93 0 0% 0 0 0
binarytrees (click) 9308 8800 11 75 0 0% 0 0 0
chunky_png (click) 254815 254344 86 1081 1 0% 0 0 0
erubi (click) 179596 177900 9 83 0 0% 0 0 0
erubi_rails (click) 1692449 1691044 288 2559 1 0% 0 0 0
etanni (click) 12717 11084 11 55 0 0% 0 0 0
fannkuchredux (click) 20902 19584 8 219 0 0% 0 0 0
lee (click) 225453 224391 49 655 0 0% 0 0 0
nbody (click) 17329 16924 10 178 0 0% 0 0 0
optcarrot (click) 351682 350196 197 4303 22 0% 0 0 0
ruby-json (click) 25088 24860 11 180 0 0% 0 0 0
rubykon (click) 147158 144692 145 1629 2 0% 0 0 0
setivar_young_object (click) 6476 5072 9 62 0 0% 0 0 0
30k_ifelse (click) 5103796 5103684 9263 50806 0 0% 0 0 0
30k_methods (click) 1890666 1888800 5781 19360 0 0% 0 0 0
cfunc_itself (click) 6637 4088 8 61 0 0% 0 0 0
fib (click) 5052 3596 8 49 0 0% 0 0 0
getivar (click) 6310 5188 8 74 0 0% 0 0 0
keyword_args (click) 7309 4464 9 63 0 0% 0 0 0
respond_to (click) 7162 5232 8 76 0 0% 0 0 0
setivar (click) 5343 4356 8 54 0 0% 0 0 0
setivar_object (click) 5678 4356 8 54 0 0% 0 0 0
str_concat (click) 6974 5040 10 76 0 0% 0 0 0
throw (click) 4096 2736 10 37 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.