YJIT Benchmarks

Details for Benchmarks at 2024-12-12 03:49:01 UTC

YJIT metrics from the yjit-bench suite using Ruby 29caae9991.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.8% faster than CRuby 3.4.0dev
  • 5.0% faster than YJIT 3.3.6
On railsbench it is
  • 99.5% faster than CRuby 3.4.0dev
  • 7.0% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 17 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 83 5 83 50 155 50 164
chunky-png 5 32 5 32 50 15 50 33
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 412 5 427 50 572 50 627
liquid-compile 5 409 5 409 50 541 50 561
liquid-render 5 171 5 172 50 405 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 193 50 237 50 241
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 253 50 267
ruby-lsp 5 155 5 159 50 245 50 203
sequel 5 420 5 417 50 575 50 593
binarytrees 5 84 5 82 50 144 50 140
blurhash 5 82 5 83 50 127 50 145
erubi 5 115 5 148 50 91 50 148
etanni 5 91 5 101 50 54 50 72
fannkuchredux 5 52 5 55 50 101 50 105
fluentd 5 64 5 65 50 25 50 29
graphql 5 85 5 85 50 57 50 55
graphql-native 5 50 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 98
nbody 5 249 5 250 50 577 50 707
nqueens 5 120 5 120 50 75 50 561
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 175 50 619 50 743
protoboeuf-encode 5 180 5 201 50 326 50 818
rack 5 595 5 636 50 958 50 1050
ruby-json 5 83 5 86 50 49 50 52
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 161
tinygql 5 36 5 38 50 23 50 29
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 39 5 38 50 482 50 477
cfunc_itself 5 342 5 336 50 1046 50 1145
fib 5 127 5 111 50 900 50 935
getivar 5 207 5 217 50 2260 50 2617
keyword_args 5 105 5 104 50 959 50 1134
object-new 5 321 5 311 50 404 50 384
respond_to 5 133 5 136 50 3254 50 3979
ruby-xor 5 240 5 248 50 803 50 1384
setivar 5 365 5 357 50 3123 50 5705
setivar_object 5 374 5 341 50 779 50 841
setivar_young 5 369 5 344 50 765 50 842
str_concat 5 402 5 389 50 965 50 1210
throw 5 1261 5 1274 50 1735 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) 1421958 1156629 210 2211 0 0% 0 0 64.731363
chunky-png (click) 298100 268009 85 1127 1 0% 0 0 33.788413
erubi-rails (click) 1927045 1637428 259 2988 19 0% 0 0 82.067065
hexapdf (click) 1435734 1275131 596 13159 39 0% 0 0 378.937222
liquid-c (click) 507586 431660 115 1764 5 0% 0 0 50.183195
liquid-compile (click) 397312 349713 147 2097 2 0% 0 0 65.345854
liquid-render (click) 576800 521777 132 2329 8 0% 0 0 66.458181
lobsters (click) 8104366 6826724 3213 52618 171 0% 0 0 1795.028428
mail (click) 734315 649131 343 5321 14 0% 0 0 156.938477
psych-load (click) 276124 217178 62 618 3 0% 0 0 19.084803
railsbench (click) 3261739 2803888 1642 16219 52 0% 0 0 470.023778
rubocop (click) 5673524 4958247 2888 50600 110 0% 4 0 1480.027151
ruby-lsp (click) 827525 741318 306 4744 24 0% 0 0 135.498476
sequel (click) 479998 411410 12 102 0 0% 0 0 3.820141
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.323163
blurhash (click) 50590 43092 28 442 0 0% 0 0 14.36663
erubi (click) 251974 211847 6 100 0 0% 0 0 3.420786
etanni (click) 31129 29637 8 87 0 0% 0 0 3.003978
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.512978
fluentd (click) 337443 304154 8 96 0 0% 0 0 3.262052
graphql (click) 389403 326239 67 679 0 0% 0 0 21.147034
graphql-native (click) 362781 328154 38 258 0 0% 0 0 8.632974
lee (click) 265658 226119 46 749 0 0% 0 0 23.55904
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.367864
matmul (click) 10988 3769 9 112 0 0% 0 0 3.653
nbody (click) 13396 17343 7 175 0 0% 0 0 4.623989
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.010829
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 100.725504
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.633096
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.41767
rack (click) 238339 186821 33 388 0 0% 0 0 10.220719
ruby-json (click) 26217 23191 9 181 0 0% 0 0 5.072055
rubykon (click) 134396 137392 138 1492 3 0% 0 0 43.049209
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.361339
tinygql (click) 295513 266997 59 765 5 0% 0 0 21.819419
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1422.614297
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 455.752684
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.448509
fib (click) 2930 3118 4 29 0 0% 0 0 1.09583
getivar (click) 3832 4970 4 54 0 0% 0 0 1.441335
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.743307
object-new (click) 2264 2350 3 25 0 0% 0 0 0.824859
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.916917
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.019868
setivar (click) 2983 3646 4 34 0 0% 0 0 1.091525
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.203541
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.415657
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.134554
throw (click) 6179 4548 6 49 0 0% 0 0 1.715678

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.