YJIT Benchmarks

Details for Benchmarks at 2024-12-10 03:49:08 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.3% faster than CRuby 3.4.0dev
  • 5.2% faster than YJIT 3.3.6
On railsbench it is
  • 97.8% faster than CRuby 3.4.0dev
  • 2.5% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 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.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 82 5 83 50 156 50 163
chunky-png 5 31 5 32 50 16 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 419 50 591 50 624
liquid-compile 5 426 5 411 50 543 50 559
liquid-render 5 169 5 171 50 403 50 437
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 187 50 237 50 253
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 158 5 156 50 251 50 266
ruby-lsp 5 155 5 160 50 205 50 200
sequel 5 429 5 419 50 595 50 561
binarytrees 5 84 5 80 50 144 50 140
blurhash 5 82 5 84 50 127 50 145
erubi 5 75 5 147 50 98 50 148
etanni 5 91 5 100 50 54 50 71
fannkuchredux 5 52 5 55 50 100 50 101
fluentd 5 63 5 62 50 25 50 23
graphql 5 85 5 86 50 56 50 57
graphql-native 5 39 5 52 50 10 50 15
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 24 50 48 50 64
matmul 5 51 5 54 50 84 50 96
nbody 5 248 5 252 50 577 50 708
nqueens 5 120 5 120 50 75 50 566
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 175 50 620 50 739
protoboeuf-encode 5 179 5 199 50 328 50 824
rack 5 581 5 638 50 951 50 1047
ruby-json 5 84 5 85 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 35 5 37 50 22 50 30
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 38 5 39 50 483 50 477
cfunc_itself 5 342 5 334 50 1046 50 1145
fib 5 127 5 127 50 900 50 935
getivar 5 207 5 219 50 2264 50 2628
keyword_args 5 105 5 105 50 959 50 1134
object-new 5 321 5 311 50 404 50 375
respond_to 5 133 5 137 50 3255 50 3980
ruby-xor 5 241 5 246 50 803 50 1387
setivar 5 358 5 357 50 3123 50 5703
setivar_object 5 374 5 339 50 780 50 837
setivar_young 5 374 5 344 50 768 50 852
str_concat 5 402 5 392 50 966 50 1215
throw 5 1260 5 1263 50 1748 50 1661

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) 1449071 1247932 210 2211 0 0% 0 0 64.310859
chunky-png (click) 284732 228152 85 1127 1 0% 0 0 33.157415
erubi-rails (click) 1904296 1588271 260 2964 19 0% 0 0 81.11124
hexapdf (click) 1470090 1238189 596 13160 41 0% 0 0 381.131099
liquid-c (click) 503334 436873 115 1764 5 0% 0 0 49.936631
liquid-compile (click) 435862 381858 147 2117 2 0% 0 0 67.846264
liquid-render (click) 589140 531366 132 2329 8 0% 0 0 66.41502
lobsters (click) 8128015 6874487 3214 52594 170 0% 0 0 1799.352
mail (click) 746905 675026 343 5321 14 0% 0 0 157.470902
psych-load (click) 248036 217909 62 618 3 0% 0 0 19.388281
railsbench (click) 3240215 2803929 1642 16222 52 0% 0 0 499.935973
rubocop (click) 5679653 4807018 2888 50610 110 0% 4 0 1492.496335
ruby-lsp (click) 821606 774098 306 4745 24 0% 0 0 135.033308
sequel (click) 453714 427139 12 109 0 0% 0 0 4.026
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.361165
blurhash (click) 50590 43092 28 442 0 0% 0 0 14.323051
erubi (click) 255754 215119 6 100 0 0% 0 0 3.420585
etanni (click) 31129 29637 8 87 0 0% 0 0 3.006603
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.485629
fluentd (click) 367684 337799 8 96 0 0% 0 0 3.284031
graphql (click) 394111 355351 67 679 0 0% 0 0 21.091215
graphql-native (click) 396484 338893 38 258 0 0% 0 0 8.719252
lee (click) 303084 289615 46 749 0 0% 0 0 23.481137
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.404638
matmul (click) 10988 3769 9 112 0 0% 0 0 3.660194
nbody (click) 13396 17343 7 175 0 0% 0 0 4.562223
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.083155
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 103.060429
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.531661
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.224771
rack (click) 265700 225551 33 388 0 0% 0 0 10.178248
ruby-json (click) 26291 23278 9 181 0 0% 0 0 5.127711
rubykon (click) 136035 147112 138 1506 3 0% 0 0 43.6215
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.426166
tinygql (click) 276569 242368 59 765 5 0% 0 0 21.765385
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1423.413351
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 451.346828
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.471528
fib (click) 2930 3118 4 29 0 0% 0 0 1.1037
getivar (click) 3832 4970 4 54 0 0% 0 0 1.454394
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.794318
object-new (click) 2264 2350 3 25 0 0% 0 0 0.908874
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.859908
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.977975
setivar (click) 2983 3646 4 34 0 0% 0 0 1.110317
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.22301
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.40881
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.137013
throw (click) 6179 4548 6 49 0 0% 0 0 1.690617

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.