YJIT Benchmarks

Details for Benchmarks at 2024-11-03 03:46:09 UTC

YJIT metrics from the yjit-bench suite using Ruby 3e2ee99057

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.2% faster than CRuby 3.4.0dev
  • 4.3% faster than YJIT 3.3.4
On railsbench it is
  • 102.9% faster than CRuby 3.4.0dev
  • 5.2% faster than YJIT 3.3.4

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 CRuby 3.3.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 83 5 82 50 155 50 158
chunky-png 5 31 5 31 50 15 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 426 50 576 50 633
liquid-compile 5 411 5 403 50 541 50 547
liquid-render 5 169 5 167 50 401 50 432
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 181 50 250 50 245
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 250 50 266
ruby-lsp 5 155 5 151 50 246 50 236
sequel 5 428 5 413 50 558 50 584
binarytrees 5 84 5 83 50 146 50 147
blurhash 5 82 5 83 50 128 50 145
erubi 5 106 5 144 50 95 50 122
etanni 5 89 5 97 50 52 50 61
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 61 5 63 50 21 50 30
graphql 5 85 5 84 50 57 50 57
graphql-native 5 40 5 52 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 52 5 52 50 88 50 99
nbody 5 248 5 254 50 594 50 707
nqueens 5 119 5 120 50 74 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 173 50 615 50 688
protoboeuf-encode 5 179 5 196 50 328 50 781
rack 5 578 5 629 50 959 50 1043
ruby-json 5 84 5 82 50 49 50 48
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 163 50 159
tinygql 5 37 5 36 50 24 50 27
30k_ifelse 5 28 5 28 50 212 50 192
30k_methods 5 38 5 38 50 482 50 476
cfunc_itself 5 347 5 337 50 1046 50 1135
fib 5 127 5 127 50 899 50 961
getivar 5 206 5 214 50 2269 50 2612
keyword_args 5 108 5 103 50 959 50 1231
object-new 5 321 5 271 50 406 50 304
respond_to 5 137 5 139 50 3258 50 4037
ruby-xor 5 243 5 244 50 803 50 1375
setivar 5 360 5 356 50 3127 50 5715
setivar_object 5 372 5 350 50 766 50 787
setivar_young 5 372 5 352 50 771 50 843
str_concat 5 400 5 397 50 987 50 1164
throw 5 1264 5 1140 50 1725 50 1389

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 Compile Time MS
activerecord (click) 1453503 1249476 213 2296 0 0% 0 0 65.692708
chunky-png (click) 290236 273602 86 1133 1 0% 0 0 33.280462
erubi-rails (click) 1927077 1659570 248 2897 8 0% 0 0 79.347624
hexapdf (click) 1482419 1282522 597 13852 35 0% 0 0 398.063326
liquid-c (click) 488950 389543 119 1852 5 0% 0 0 51.968909
liquid-compile (click) 408879 362840 150 2199 2 0% 0 0 68.226546
liquid-render (click) 635173 560236 136 2466 12 0% 0 0 69.940666
lobsters (click) 8331680 7035730 3213 54280 183 0% 0 0 1856.822678
mail (click) 775184 664343 346 5515 16 0% 0 0 159.969229
psych-load (click) 261043 213030 64 654 3 0% 0 0 20.640939
railsbench (click) 3333333 2838065 1632 16687 41 0% 0 0 477.042281
rubocop (click) 5821403 5000523 2891 52157 110 0% 4 0 1516.752829
ruby-lsp (click) 884344 754269 308 4990 26 0% 0 0 139.570752
sequel (click) 496433 450545 15 118 0 0% 0 0 4.368733
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.016999
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.144967
erubi (click) 251699 235683 9 108 0 0% 0 0 3.649094
etanni (click) 27632 25826 9 85 0 0% 0 0 2.904155
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.867726
fluentd (click) 349800 316017 10 109 0 0% 0 0 3.919845
graphql (click) 396054 327512 69 695 0 0% 0 0 20.512504
graphql-native (click) 360680 293385 40 270 0 0% 0 0 8.560038
lee (click) 287625 244676 48 803 0 0% 0 0 24.913557
matmul (click) 11838 4563 10 119 0 0% 0 0 3.928507
nbody (click) 14884 19325 8 196 0 0% 0 0 5.142754
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.309663
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.114286
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.337141
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.138513
rack (click) 251743 215943 36 420 0 0% 0 0 11.273183
ruby-json (click) 25799 22401 10 188 0 0% 0 0 5.408273
rubykon (click) 140297 120385 138 1566 3 0% 0 0 44.735227
sudoku (click) 48090 43120 9 536 0 0% 0 0 16.093397
tinygql (click) 298642 278338 61 787 5 0% 0 0 22.621025
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1584.164146
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 454.477986
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.992245
fib (click) 4041 4120 5 37 0 0% 0 0 1.44356
getivar (click) 5037 6014 6 64 0 0% 0 0 1.865085
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.029593
object-new (click) 3469 3394 5 35 0 0% 0 0 1.379715
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.746707
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.229842
setivar (click) 4188 4690 6 44 0 0% 0 0 1.560747
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.709549
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.904131
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.672304
throw (click) 7384 5592 8 59 0 0% 0 0 2.151938

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.