Ruby Benchmarks

Details for Benchmarks at 2026-07-25 00:55:44 UTC

YJIT metrics from the ruby-bench suite using Ruby ae86855622.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.9% faster than CRuby 4.1.0dev
  • 5.0% faster than YJIT 3.4.7
On railsbench it is
  • 112.1% faster than CRuby 4.1.0dev
  • 11.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 10 minutes
aarch64 runtime: 7 hours, 53 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.1.0dev warmups CRuby 4.1.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.1.0dev warmups YJIT 4.1.0dev iters
activerecord 5 91 5 96 50 198 50 203
chunky-png 5 32 5 30 50 33 50 24
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 438 50 630 50 659
liquid-compile 5 407 5 510 50 583 50 825
liquid-il 5 67 5 68 50 116 50 125
liquid-render 5 172 5 172 50 432 50 464
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 254 50 287
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 248 50 238
ruby-lsp 5 158 5 159 50 214 50 224
sequel 5 429 5 459 50 596 50 656
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 28 50 12 50 17
addressable-getters 5 165 5 171 50 183 50 207
addressable-join 5 74 5 81 50 66 50 78
addressable-merge 5 160 5 159 50 223 50 228
addressable-new 5 353 5 344 50 521 50 512
addressable-normalize 5 53 5 57 50 60 50 69
addressable-parse 5 104 5 106 50 104 50 116
addressable-setters 5 185 5 185 50 234 50 252
addressable-to-s 5 164 5 170 50 183 50 205
binarytrees 5 82 5 88 50 136 50 168
blurhash 5 84 5 84 50 145 50 145
erubi 5 137 5 153 50 137 50 162
etanni 5 100 5 81 50 72 50 50
fannkuchredux 5 55 5 56 50 101 50 110
fluentd 5 55 5 59 50 20 50 28
gcbench 5 10 5 10 50 10 50 10
graphql 5 373 5 454 50 564 50 904
graphql-native 5 57 5 87 50 20 50 60
knucleotide 5 163 5 149 50 118 50 103
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 52 50 88 50 96
nbody 5 250 5 249 50 662 50 632
nqueens 5 119 5 127 50 554 50 598
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 177 50 697 50 693
protoboeuf-encode 5 200 5 203 50 798 50 806
rack 5 451 5 456 50 711 50 740
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 205 50 250 50 237
string_malloc_pressure 5 147 5 33 50 102 50 10
sudoku 5 48 5 49 50 155 50 171
tinygql 5 41 5 42 50 36 50 51
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 39 5 39 50 457 50 459
attr_accessor 5 157 5 177 50 1814 50 1883
cfunc_itself 5 348 5 323 50 1255 50 1258
fib 5 124 5 130 50 939 50 939
getivar 5 211 5 320 50 2307 50 2426
getivar-module 5 103 5 143 50 89 50 117
keyword_args 5 102 5 92 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 479 50 296 50 1473
object-new-initialize 5 169 5 254 50 259 50 517
object-new-no-escape 5 81 5 141 50 89 50 365
respond_to 5 139 5 121 50 3904 50 3897
ruby-xor 5 247 5 232 50 1305 50 1302
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 106 5 102 50 306 50 283
send_rubyfunc_block 5 196 5 204 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 347 50 4930 50 4921
setivar_object 5 341 5 272 50 762 50 720
setivar_young 5 341 5 272 50 808 50 724
str_concat 5 390 5 435 50 1196 50 1090
structaref 5 153 5 183 50 1743 50 1866
structaset 5 198 5 221 50 370 50 478
throw 5 1109 5 1324 50 1444 50 1705

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) 1553412 1371416 203 2596 0 0% 0 0 75.434131
chunky-png (click) 319829 320367 79 1372 1 0% 0 0 38.307136
erubi-rails (click) 1380430 1197283 268 3630 23 0% 0 0 93.908118
hexapdf (click) 1525007 1355581 594 15686 45 0% 0 0 424.363979
liquid-c (click) 559051 451087 114 2226 5 0% 0 0 57.955977
liquid-compile (click) 478304 431392 146 2679 2 0% 0 0 72.66067
liquid-il (click) 614910 584716 70 2720 0 0% 0 0 79.566081
liquid-render (click) 666112 616523 131 2945 8 0% 0 0 76.745987
lobsters (click) 8530233 7081646 3127 63089 125 0% 0 0 2027.228879
mail (click) 866096 813714 345 7654 40 0% 0 0 205.71506
psych-load (click) 286757 283145 60 820 2 0% 0 0 22.964712
railsbench (click) 3359169 2850381 1591 19737 105 0% 0 0 535.782612
rubocop (click) 5763279 4999827 3000 57018 133 0% 6 0 1637.938905
ruby-lsp (click) 1045821 966707 408 7425 47 0% 1 0 199.839305
sequel (click) 522812 489791 11 119 0 0% 0 0 3.723018
shipit (click) 6883747 5866239 3136 49872 147 0% 0 0 1598.53786
addressable-equality (click) 322006 283029 44 1381 1 0% 0 0 33.223275
addressable-getters (click) 283920 211487 26 863 0 0% 0 0 20.193492
addressable-join (click) 287781 259088 24 941 0 0% 0 0 22.588813
addressable-merge (click) 287807 253483 27 896 0 0% 0 0 21.300959
addressable-new (click) 264274 203754 21 563 0 0% 0 0 13.439017
addressable-normalize (click) 317085 245006 43 1327 1 0% 0 0 31.540337
addressable-parse (click) 268199 199214 26 880 0 0% 0 0 20.814079
addressable-setters (click) 264748 222647 20 582 0 0% 0 0 14.13242
addressable-to-s (click) 283807 210669 26 849 0 0% 0 0 20.173107
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.777747
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.884315
erubi (click) 249978 225287 6 134 0 0% 0 0 3.870042
etanni (click) 33079 34728 8 114 0 0% 0 0 3.439438
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.769216
fluentd (click) 513951 461029 7 116 0 0% 0 0 3.59036
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.487863
graphql (click) 396550 351561 74 1939 17 0% 0 0 52.634143
graphql-native (click) 356723 305284 39 532 0 0% 0 0 13.613204
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.70553
lee (click) 319226 289261 50 1101 0 0% 0 0 30.596216
matmul (click) 11103 4709 8 136 0 0% 0 0 4.124855
nbody (click) 14448 21176 6 251 0 0% 0 0 6.1281
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.383667
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 107.25649
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.439793
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.343833
rack (click) 285150 221907 35 581 0 0% 0 0 14.54421
ruby-json (click) 19789 17789 8 206 0 0% 0 0 5.746529
rubyboy (click) 709630 610942 154 6871 42 0% 0 0 163.549957
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.54587
splay (click) 34682 14303 9 175 0 0% 0 0 5.35759
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.704111
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.873634
tinygql (click) 283415 252520 59 1024 5 0% 0 0 26.571453
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1877.936581
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 478.354189
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.113103
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.519098
fib (click) 2659 2995 3 30 0 0% 0 0 1.11911
getivar (click) 3789 6778 3 79 0 0% 0 0 1.907587
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.308341
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.795346
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.893637
object-new (click) 2406 2818 2 36 0 0% 0 0 0.990849
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.290154
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.734536
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.127944
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799974
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.80151
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.297851
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.760655
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.065943
setivar (click) 2783 3726 3 46 0 0% 0 0 1.256523
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406075
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.73406
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.47259
structaref (click) 4407 9095 3 88 0 0% 0 0 2.337126
structaset (click) 4113 5834 3 70 0 0% 0 0 1.775299
throw (click) 5953 4624 5 53 0 0% 0 0 1.802178

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.