YJIT Benchmarks

Details for Benchmarks at 2024-12-31 03:44:07 UTC

YJIT metrics from the yjit-bench suite using Ruby 5fec930832.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.3% faster than CRuby 3.5.0dev
  • 5.9% faster than YJIT 3.3.6
On railsbench it is
  • 99.4% faster than CRuby 3.5.0dev
  • 5.3% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 18 minutes

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.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 82 5 82 50 151 50 162
chunky-png 5 32 5 32 50 15 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 407 5 421 50 589 50 624
liquid-compile 5 410 5 408 50 544 50 553
liquid-render 5 169 5 169 50 406 50 422
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 185 50 243 50 253
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 250 50 267
ruby-lsp 5 157 5 155 50 239 50 260
sequel 5 432 5 415 50 576 50 584
binarytrees 5 84 5 82 50 144 50 140
blurhash 5 82 5 82 50 127 50 145
erubi 5 116 5 134 50 98 50 149
etanni 5 91 5 97 50 54 50 72
fannkuchredux 5 52 5 55 50 101 50 103
fluentd 5 64 5 64 50 24 50 29
graphql 5 85 5 86 50 56 50 57
graphql-native 5 49 5 53 50 10 50 15
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 51 5 51 50 85 50 98
nbody 5 248 5 258 50 577 50 703
nqueens 5 120 5 120 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 175 50 620 50 719
protoboeuf-encode 5 180 5 196 50 329 50 830
rack 5 581 5 622 50 954 50 1074
ruby-json 5 83 5 84 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 36 5 38 50 22 50 28
30k_ifelse 5 28 5 28 50 216 50 207
30k_methods 5 39 5 39 50 479 50 471
cfunc_itself 5 346 5 329 50 1046 50 1145
fib 5 127 5 128 50 909 50 937
getivar 5 207 5 217 50 2262 50 2633
keyword_args 5 107 5 104 50 959 50 1134
object-new 5 321 5 310 50 404 50 379
respond_to 5 133 5 141 50 3260 50 3983
ruby-xor 5 241 5 245 50 804 50 1384
setivar 5 358 5 358 50 3130 50 5714
setivar_object 5 356 5 341 50 747 50 850
setivar_young 5 374 5 344 50 770 50 851
str_concat 5 401 5 392 50 968 50 1181
throw 5 1262 5 1266 50 1729 50 1702

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) 1410290 1182249 210 2207 0 0% 0 0 63.967578
chunky-png (click) 295461 243082 85 1127 1 0% 0 0 33.226455
erubi-rails (click) 1916686 1623033 260 2962 19 0% 0 0 81.759126
hexapdf (click) 1467438 1277334 597 13149 41 0% 0 0 376.375009
liquid-c (click) 500437 450445 115 1750 5 0% 0 0 49.750508
liquid-compile (click) 408426 342948 147 2087 2 0% 0 0 64.305692
liquid-render (click) 582838 506504 132 2315 8 0% 0 0 65.11213
lobsters (click) 8116698 6781032 3213 52517 169 0% 0 0 1794.494908
mail (click) 730677 636131 343 5321 14 0% 0 0 153.687896
psych-load (click) 247181 206808 62 620 3 0% 0 0 19.454744
railsbench (click) 3257207 2832179 1642 16184 52 0% 0 0 468.202118
rubocop (click) 5668856 4836067 2888 50556 110 0% 4 0 1490.637992
ruby-lsp (click) 832773 671308 306 4737 24 0% 0 0 134.367655
sequel (click) 451462 400108 12 97 0 0% 0 0 3.371367
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.355531
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.286413
erubi (click) 231405 187638 6 100 0 0% 0 0 3.388218
etanni (click) 31129 29637 8 87 0 0% 0 0 2.996964
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.436341
fluentd (click) 345231 301688 8 96 0 0% 0 0 3.302287
graphql (click) 427272 365951 67 679 0 0% 0 0 20.92537
graphql-native (click) 360425 300082 38 258 0 0% 0 0 8.680896
lee (click) 269948 250965 46 749 0 0% 0 0 23.452
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.355176
matmul (click) 10988 3769 9 112 0 0% 0 0 3.639417
nbody (click) 13396 17343 7 175 0 0% 0 0 4.626067
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.024076
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 102.906317
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.311086
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.323121
rack (click) 237147 206310 33 388 0 0% 0 0 10.057822
ruby-json (click) 20509 17904 9 181 0 0% 0 0 5.078053
rubykon (click) 135230 146429 138 1500 3 0% 0 0 43.07263
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.45072
tinygql (click) 268429 242690 59 765 5 0% 0 0 21.894849
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1406.734245
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 450.138088
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.521457
fib (click) 2930 3118 4 29 0 0% 0 0 1.180171
getivar (click) 3832 4970 4 54 0 0% 0 0 1.507558
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.759561
object-new (click) 2264 2350 3 25 0 0% 0 0 0.872809
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.906301
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.961356
setivar (click) 2983 3646 4 34 0 0% 0 0 1.136004
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.270055
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.502921
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.084781
throw (click) 6179 4548 6 49 0 0% 0 0 1.686727

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.