YJIT Benchmarks

Details for Benchmarks at 2024-12-27 03:44:58 UTC

YJIT metrics from the yjit-bench suite using Ruby a37a2f5fef.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.4% faster than CRuby 3.5.0dev
  • 5.4% faster than YJIT 3.3.6
On railsbench it is
  • 99.2% faster than CRuby 3.5.0dev
  • 4.1% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 50 minutes
aarch64 runtime: 3 hours, 19 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 83 50 155 50 161
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 420 50 559 50 622
liquid-compile 5 413 5 408 50 578 50 557
liquid-render 5 172 5 171 50 406 50 439
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 179 50 239 50 214
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 253 50 266
ruby-lsp 5 155 5 159 50 239 50 276
sequel 5 430 5 418 50 574 50 581
binarytrees 5 84 5 82 50 144 50 140
blurhash 5 82 5 82 50 127 50 145
erubi 5 89 5 142 50 98 50 144
etanni 5 91 5 97 50 54 50 72
fannkuchredux 5 52 5 55 50 101 50 103
fluentd 5 63 5 63 50 25 50 30
graphql 5 85 5 85 50 57 50 55
graphql-native 5 40 5 53 50 10 50 14
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 50 5 51 50 85 50 90
nbody 5 248 5 258 50 576 50 703
nqueens 5 120 5 120 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 170 5 175 50 620 50 719
protoboeuf-encode 5 179 5 177 50 328 50 826
rack 5 578 5 629 50 949 50 1035
ruby-json 5 84 5 85 50 48 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 35 5 38 50 22 50 27
30k_ifelse 5 28 5 28 50 217 50 208
30k_methods 5 39 5 39 50 483 50 477
cfunc_itself 5 346 5 329 50 1046 50 1145
fib 5 127 5 128 50 909 50 937
getivar 5 207 5 219 50 2256 50 2631
keyword_args 5 106 5 105 50 959 50 1134
object-new 5 321 5 310 50 405 50 379
respond_to 5 133 5 141 50 3261 50 3979
ruby-xor 5 240 5 245 50 803 50 1371
setivar 5 358 5 358 50 3121 50 5716
setivar_object 5 374 5 341 50 746 50 848
setivar_young 5 374 5 347 50 769 50 848
str_concat 5 401 5 394 50 970 50 1200
throw 5 1259 5 1255 50 1730 50 1703

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) 1413730 1210974 210 2207 0 0% 0 0 64.942702
chunky-png (click) 324859 294009 85 1132 1 0% 0 0 33.187571
erubi-rails (click) 1921514 1577781 259 2953 19 0% 0 0 81.100194
hexapdf (click) 1468990 1327495 596 13146 41 0% 0 0 374.917762
liquid-c (click) 478227 411820 115 1750 5 0% 0 0 48.722662
liquid-compile (click) 404622 327855 147 2087 2 0% 0 0 65.566526
liquid-render (click) 580434 520286 132 2315 8 0% 0 0 65.300068
lobsters (click) 8087860 6718236 3212 52428 169 0% 0 0 1792.005538
mail (click) 729826 635724 343 5321 14 0% 0 0 154.180142
psych-load (click) 277938 227119 62 620 3 0% 0 0 19.231995
railsbench (click) 3250005 2777894 1642 16193 52 0% 0 0 495.624691
rubocop (click) 5690020 5003935 2888 50550 110 0% 4 0 1471.485825
ruby-lsp (click) 824381 721947 306 4737 24 0% 0 0 134.068159
sequel (click) 461538 388459 12 97 0 0% 0 0 3.506592
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.384503
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.321787
erubi (click) 224533 189021 6 100 0 0% 0 0 3.273831
etanni (click) 31129 29637 8 87 0 0% 0 0 2.967158
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.45903
fluentd (click) 338227 313331 8 96 0 0% 0 0 3.332449
graphql (click) 400663 364428 67 679 0 0% 0 0 21.218524
graphql-native (click) 395688 321872 38 258 0 0% 0 0 8.806119
lee (click) 275186 237841 46 749 0 0% 0 0 23.532757
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.382701
matmul (click) 10988 3769 9 112 0 0% 0 0 3.655149
nbody (click) 13396 17343 7 175 0 0% 0 0 4.584352
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.039785
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 103.121581
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 41.927224
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.420729
rack (click) 263787 232339 33 388 0 0% 0 0 10.226969
ruby-json (click) 25796 22844 9 181 0 0% 0 0 5.168412
rubykon (click) 135230 146429 138 1500 3 0% 0 0 42.985252
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.391321
tinygql (click) 268429 242690 59 765 5 0% 0 0 21.986021
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1422.616737
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 453.567602
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.513121
fib (click) 2930 3118 4 29 0 0% 0 0 1.113066
getivar (click) 3832 4970 4 54 0 0% 0 0 1.510802
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.792136
object-new (click) 2264 2350 3 25 0 0% 0 0 0.867937
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.941685
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.029063
setivar (click) 2983 3646 4 34 0 0% 0 0 1.153447
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.234184
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.501279
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.13365
throw (click) 6179 4548 6 49 0 0% 0 0 1.683897

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.