Ruby Benchmarks

Details for Benchmarks at 2025-12-25 00:42:00 UTC

YJIT metrics from the ruby-bench suite using Ruby 3c4cda10eb.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 96.1% faster than CRuby 4.0.0dev
  • 5.0% faster than YJIT 3.4.7
On railsbench it is
  • 112.0% faster than CRuby 4.0.0dev
  • 9.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 9 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.4.7 warmups CRuby 3.4.7 iters CRuby 4.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 90 5 98 50 196 50 242
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 422 50 628 50 625
liquid-compile 5 419 5 474 50 585 50 717
liquid-render 5 167 5 170 50 431 50 423
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 190 50 253 50 272
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 156 50 247 50 249
ruby-lsp 5 142 5 144 50 240 50 243
sequel 5 429 5 439 50 586 50 600
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 163 5 167 50 184 50 189
addressable-join 5 71 5 74 50 66 50 67
addressable-merge 5 159 5 154 50 222 50 216
addressable-new 5 356 5 352 50 523 50 513
addressable-normalize 5 54 5 51 50 59 50 55
addressable-parse 5 103 5 104 50 104 50 108
addressable-setters 5 183 5 179 50 229 50 224
addressable-to-s 5 163 5 167 50 182 50 189
binarytrees 5 82 5 85 50 136 50 139
blurhash 5 83 5 87 50 143 50 145
erubi 5 136 5 140 50 136 50 142
etanni 5 97 5 68 50 71 50 32
fannkuchredux 5 54 5 55 50 102 50 100
fluentd 5 56 5 62 50 20 50 31
graphql 5 373 5 474 50 572 50 930
graphql-native 5 58 5 87 50 23 50 67
knucleotide 5 163 5 158 50 118 50 112
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 247 5 258 50 676 50 708
nqueens 5 116 5 129 50 556 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 184 50 706 50 668
protoboeuf-encode 5 197 5 202 50 834 50 762
rack 5 436 5 444 50 700 50 696
ruby-json 5 82 5 96 50 46 50 66
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 157 50 162
tinygql 5 41 5 44 50 40 50 46
30k_ifelse 5 28 5 28 50 185 50 179
30k_methods 5 38 5 40 50 453 50 454
attr_accessor 5 157 5 222 50 1836 50 1952
cfunc_itself 5 348 5 359 50 1254 50 1259
fib 5 124 5 142 50 939 50 940
getivar 5 216 5 337 50 2315 50 2436
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 105 50 1239 50 1243
loops-times 5 23 5 26 50 64 50 58
object-new 5 268 5 362 50 299 50 677
respond_to 5 139 5 139 50 3890 50 3904
ruby-xor 5 238 5 253 50 1314 50 1292
send_bmethod 5 116 5 120 50 5538 50 4528
send_cfunc_block 5 106 5 105 50 353 50 331
send_rubyfunc_block 5 251 5 248 50 6922 50 6925
setivar 5 360 5 476 50 4926 50 5037
setivar_object 5 337 5 334 50 752 50 614
setivar_young 5 341 5 335 50 800 50 638
str_concat 5 390 5 432 50 1199 50 1112
structaref 5 156 5 208 50 1811 50 1908
structaset 5 201 5 252 50 396 50 508
throw 5 1088 5 1284 50 1422 50 1559

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT warms up fairly quickly, while some JITs may start slower as they do more advanced compilation.

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) 1538261 1382044 203 2637 0 0% 0 0 74.646942
chunky-png (click) 321761 328486 79 1373 1 0% 0 0 38.869701
erubi-rails (click) 1365712 1225048 269 3645 22 0% 0 0 97.950684
hexapdf (click) 1521292 1320028 593 15664 44 0% 0 0 438.306902
liquid-c (click) 557270 464222 114 2228 5 0% 0 0 59.646675
liquid-compile (click) 479278 382571 146 2721 2 0% 0 0 79.170732
liquid-render (click) 653113 550785 131 2946 8 0% 0 0 80.159936
lobsters (click) 8675466 7421145 3127 64064 117 0% 0 0 2107.881096
mail (click) 866262 836293 345 7721 40 0% 0 0 212.894279
psych-load (click) 287479 265164 61 828 2 0% 0 0 23.97934
railsbench (click) 3351548 2814187 1591 19789 97 0% 0 0 551.77153
rubocop (click) 5764545 5019426 3002 56936 126 0% 6 0 1658.832222
ruby-lsp (click) 950448 862014 343 6741 45 0% 1 0 181.268973
sequel (click) 501636 405598 11 119 0 0% 0 0 3.959234
shipit (click) 7870370 6648950 3422 55492 187 0% 1 0 1820.402882
addressable-equality (click) 316710 260279 44 1381 1 0% 0 0 33.923502
addressable-getters (click) 274138 225038 26 863 0 0% 0 0 20.818708
addressable-join (click) 286286 257566 24 1005 0 0% 0 0 25.294348
addressable-merge (click) 285686 265217 27 896 0 0% 0 0 22.212884
addressable-new (click) 256775 219339 21 563 0 0% 0 0 14.155018
addressable-normalize (click) 313944 272192 43 1328 1 0% 0 0 32.304865
addressable-parse (click) 281561 229972 26 880 0 0% 0 0 21.464519
addressable-setters (click) 257610 230464 20 584 0 0% 0 0 14.90664
addressable-to-s (click) 276214 226218 26 849 0 0% 0 0 20.601957
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.819375
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.738626
erubi (click) 247401 198151 6 134 0 0% 0 0 3.933683
etanni (click) 33287 36246 8 113 0 0% 0 0 3.500968
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.738204
fluentd (click) 482288 366049 7 115 0 0% 0 0 3.76175
graphql (click) 409307 344145 73 1921 19 0% 0 0 53.56637
graphql-native (click) 341364 304663 39 532 0 0% 0 0 13.937042
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.281426
lee (click) 317085 303822 49 1097 0 0% 0 0 31.395078
matmul (click) 11103 4709 8 136 0 0% 0 0 4.238801
nbody (click) 14448 21176 6 251 0 0% 0 0 6.146416
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.138838
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.693236
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.445056
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.246267
rack (click) 280238 224655 35 626 0 0% 0 0 16.408636
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.64062
rubyboy (click) 703625 662674 154 6862 42 0% 0 0 166.538083
rubykon (click) 146229 162118 137 2070 3 0% 0 0 55.951186
sudoku (click) 51704 65882 7 870 0 0% 0 0 22.986581
tinygql (click) 294209 258161 59 1025 5 0% 0 0 26.838873
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1915.302404
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.188589
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.115289
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.489774
fib (click) 2659 2995 3 30 0 0% 0 0 1.167184
getivar (click) 3789 6778 3 79 0 0% 0 0 1.959085
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.318637
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.793283
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.933881
object-new (click) 2406 2818 2 36 0 0% 0 0 1.059935
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.126733
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.812485
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.834114
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.152249
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.479925
setivar (click) 2783 3726 3 46 0 0% 0 0 1.28785
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.414622
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.743084
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.457284
structaref (click) 4407 9095 3 88 0 0% 0 0 2.37363
structaset (click) 3926 5614 3 70 0 0% 0 0 1.769812
throw (click) 5953 4624 5 53 0 0% 0 0 1.840924

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.