YJIT Benchmarks

Details for Benchmarks at 2024-08-09 19:08:31 UTC

YJIT metrics from the yjit-bench suite using Ruby c8708c72c4

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 71.7% faster than CRuby 3.4.0dev
  • 2.2% faster than YJIT 3.3.4
On railsbench it is
  • 75.0% faster than CRuby 3.4.0dev
  • the same speed as 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 10 51 10 49 10 115 10 116
chunky-png 10 18 10 17 10 36 10 40
erubi-rails 10 10 10 10 10 20 10 18
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 337 10 347 10 485 10 509
liquid-compile 10 344 10 339 10 481 10 492
liquid-render 10 141 10 134 10 351 10 360
lobsters 10 14 10 13 10 24 10 23
mail 10 158 10 153 10 233 10 221
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 136 10 130 10 229 10 236
ruby-lsp 10 131 10 128 10 219 10 211
sequel 10 320 10 306 10 428 10 419
binarytrees 10 51 10 49 10 118 10 115
blurhash 10 61 10 58 10 120 10 144
erubi 10 67 10 97 10 97 10 126
etanni 10 59 10 64 10 69 10 74
fannkuchredux 10 10 10 10 10 18 10 16
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 35 10 20 10 40 10 25
lee 10 11 10 10 10 19 10 19
matmul 10 10 10 10 10 15 10 16
nbody 10 208 10 193 10 407 10 473
nqueens 10 117 10 110 10 117 10 456
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 179 10 603 10 688
protoboeuf-encode 10 123 10 150 10 275 10 575
rack 10 457 10 490 10 808 10 890
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 31 10 31
tinygql 10 24 10 23 10 50 10 51
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 256 10 252 10 1105 10 1212
fib 10 103 10 99 10 616 10 618
getivar 10 257 10 208 10 1274 10 1714
keyword_args 10 92 10 84 10 720 10 946
object-new 10 228 10 210 10 300 10 271
respond_to 10 94 10 91 10 1729 10 2093
ruby-xor 10 31 10 30 10 99 10 168
setivar 10 426 10 364 10 2354 10 4826
setivar_object 10 243 10 244 10 652 10 696
setivar_young 10 265 10 244 10 650 10 693
str_concat 10 327 10 356 10 592 10 794
throw 10 988 10 890 10 1274 10 1140

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) 1361155 1228390 214 2169 0 0% 0 0 80.647526
chunky-png (click) 273170 250833 83 1054 1 0% 0 0 35.672916
erubi-rails (click) 1644407 1350696 274 2932 6 0% 0 0 101.389397
hexapdf (click) 1246661 1076136 505 11811 38 0% 0 0 409.555008
liquid-c (click) 454398 392479 119 1768 5 0% 0 0 57.679133
liquid-compile (click) 378594 353799 151 2078 2 0% 0 0 72.478961
liquid-render (click) 562886 482170 136 2323 8 0% 0 0 76.554275
lobsters (click) 7556724 6270538 3080 49680 81 0% 0 0 2237.490991
mail (click) 738799 701115 347 5554 14 0% 0 0 187.326649
psych-load (click) 240086 205518 61 592 3 0% 0 0 20.916957
railsbench (click) 2892370 2440942 1636 15971 57 0% 0 0 587.004967
rubocop (click) 5443664 4524229 2894 50977 114 0% 4 0 1925.496189
ruby-lsp (click) 781316 700300 309 4750 24 0% 0 0 159.250025
sequel (click) 434780 412582 16 117 0 0% 0 0 5.120557
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.9852
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.603535
erubi (click) 211440 170125 10 112 0 0% 0 0 4.691235
etanni (click) 24958 23898 11 92 0 0% 0 0 3.55421
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.721954
fluentd (click) 329007 272604 4 28 0 0% 0 0 1.316851
graphql (click) 389042 336898 66 650 0 0% 0 0 23.345234
graphql-native (click) 361983 329714 42 278 0 0% 0 0 10.822476
lee (click) 242232 202364 34 531 0 0% 0 0 19.447015
matmul (click) 7957 8968 7 82 0 0% 0 0 3.233541
nbody (click) 15014 19017 10 191 0 0% 0 0 6.171902
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.36092
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 118.615743
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.183434
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.531938
rack (click) 220402 190956 37 408 0 0% 0 0 12.900139
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.482806
rubykon (click) 128589 131709 136 1482 3 0% 0 0 48.404488
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.022468
tinygql (click) 245817 237762 58 735 5 0% 0 0 24.31377
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1898.106497
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 532.824407
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.373494
fib (click) 4609 4792 7 45 0 0% 0 0 1.862691
getivar (click) 5575 6644 7 70 0 0% 0 0 2.342972
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.632298
object-new (click) 4039 4024 6 41 0 0% 0 0 1.980371
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.879543
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.970268
setivar (click) 4726 5320 7 50 0 0% 0 0 1.904898
setivar_object (click) 5109 5228 7 50 0 0% 0 0 2.002726
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.210833
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.282027
throw (click) 7538 6222 9 65 0 0% 0 0 2.648822

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.