Ruby Benchmarks

Details for Benchmarks at 2026-06-22 01:32:23 UTC

YJIT metrics from the ruby-bench suite using Ruby 38a22a07c2.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.7% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
On railsbench it is
  • 119.3% faster than CRuby 4.1.0dev
  • 17.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 58 minutes
aarch64 runtime: 7 hours, 49 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 90 5 98 50 204 50 234
chunky-png 5 32 5 30 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 444 50 620 50 679
liquid-compile 5 421 5 511 50 581 50 839
liquid-render 5 170 5 171 50 431 50 470
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 254 50 303
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 247 50 247
ruby-lsp 5 159 5 161 50 225 50 226
sequel 5 426 5 466 50 600 50 662
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 171 50 183 50 208
addressable-join 5 75 5 82 50 66 50 83
addressable-merge 5 161 5 159 50 223 50 243
addressable-new 5 352 5 346 50 519 50 538
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 106 50 103 50 120
addressable-setters 5 185 5 188 50 233 50 257
addressable-to-s 5 165 5 171 50 181 50 205
binarytrees 5 82 5 86 50 136 50 145
blurhash 5 84 5 85 50 145 50 145
erubi 5 138 5 149 50 141 50 152
etanni 5 99 5 80 50 73 50 47
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 55 5 60 50 20 50 27
gcbench 5 10 5 10 50 10 50 16
graphql 5 372 5 462 50 570 50 973
graphql-native 5 57 5 89 50 22 50 64
knucleotide 5 163 5 144 50 118 50 97
lee 5 23 5 29 50 10 50 17
matmul 5 53 5 53 50 88 50 94
nbody 5 250 5 244 50 662 50 631
nqueens 5 119 5 128 50 554 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 697 50 807
protoboeuf-encode 5 201 5 197 50 801 50 785
rack 5 441 5 466 50 708 50 802
ruby-json 5 83 5 113 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 204 50 250 50 242
sudoku 5 48 5 50 50 155 50 159
tinygql 5 41 5 44 50 40 50 56
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 456 50 451
attr_accessor 5 157 5 175 50 1833 50 1873
cfunc_itself 5 348 5 310 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 210 5 334 50 2306 50 2437
getivar-module 5 103 5 138 50 89 50 284
keyword_args 5 102 5 107 50 1240 50 1244
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 477 50 297 50 1446
object-new-initialize 5 168 5 235 50 259 50 980
object-new-no-escape 5 81 5 138 50 89 50 499
respond_to 5 139 5 122 50 3901 50 3907
ruby-xor 5 247 5 237 50 1305 50 1309
send_bmethod 5 118 5 110 50 5539 50 4526
send_cfunc_block 5 106 5 103 50 305 50 313
send_rubyfunc_block 5 196 5 196 50 1372 50 1375
setivar 5 359 5 382 50 4931 50 4962
setivar_object 5 341 5 307 50 762 50 656
setivar_young 5 341 5 308 50 809 50 683
str_concat 5 391 5 425 50 1201 50 1042
structaref 5 153 5 178 50 1801 50 1857
structaset 5 198 5 221 50 370 50 489
throw 5 1107 5 1380 50 1441 50 1773

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) 1564694 1336555 203 2663 0 0% 0 0 74.608896
chunky-png (click) 325394 274948 79 1376 1 0% 0 0 38.396933
erubi-rails (click) 1385494 1205200 268 3626 23 0% 0 0 99.92734
hexapdf (click) 1534515 1313651 593 15768 44 0% 0 0 429.69565
liquid-c (click) 567772 455085 114 2240 5 0% 0 0 59.435812
liquid-compile (click) 482684 414960 146 2669 2 0% 0 0 73.637673
liquid-render (click) 674031 602906 131 2963 8 0% 0 0 77.543188
lobsters (click) 8557785 7131512 3123 63330 122 0% 0 0 2025.374893
mail (click) 872880 806564 345 7738 40 0% 0 0 208.711979
psych-load (click) 292707 277326 61 829 2 0% 0 0 23.777918
railsbench (click) 3362944 2840648 1592 19741 105 0% 0 0 535.637943
rubocop (click) 5809928 5126861 3002 57381 127 0% 6 0 1729.825946
ruby-lsp (click) 1053628 909309 409 7470 47 0% 1 0 200.007347
sequel (click) 511413 463486 11 119 0 0% 0 0 3.971322
shipit (click) 6890254 5858155 3133 50026 147 0% 0 0 1611.744822
addressable-equality (click) 325512 292953 44 1380 1 0% 0 0 33.435619
addressable-getters (click) 282036 239495 26 863 0 0% 0 0 20.076704
addressable-join (click) 291218 252600 24 941 0 0% 0 0 23.014947
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.317916
addressable-new (click) 266080 228090 21 563 0 0% 0 0 13.58998
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.841613
addressable-parse (click) 288561 254174 26 880 0 0% 0 0 21.114686
addressable-setters (click) 262462 242138 20 582 0 0% 0 0 13.958494
addressable-to-s (click) 266195 260924 26 849 0 0% 0 0 19.775908
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.755362
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.211285
erubi (click) 252242 241817 6 134 0 0% 0 0 3.831117
etanni (click) 32752 34339 8 114 0 0% 0 0 3.457447
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.793845
fluentd (click) 519223 455058 7 116 0 0% 0 0 3.674685
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.387714
graphql (click) 418351 373967 74 1940 19 0% 0 0 52.805458
graphql-native (click) 361338 339191 39 532 0 0% 0 0 13.71365
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.71423
lee (click) 322390 306895 50 1102 0 0% 0 0 30.507458
matmul (click) 11103 4709 8 136 0 0% 0 0 4.12014
nbody (click) 14448 21176 6 251 0 0% 0 0 6.173601
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.333493
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.237616
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.689752
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.191127
rack (click) 288557 239839 35 581 0 0% 0 0 14.537775
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.765347
rubyboy (click) 708577 641824 154 6871 42 0% 0 0 163.953538
rubykon (click) 147788 154811 138 2094 4 0% 0 0 55.01808
splay (click) 34617 22483 9 175 0 0% 0 0 5.297486
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.800854
tinygql (click) 300847 245586 59 1026 5 0% 0 0 26.259897
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1874.952744
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.18318
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.087752
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.497886
fib (click) 2659 2995 3 30 0 0% 0 0 1.105601
getivar (click) 3789 6778 3 79 0 0% 0 0 1.961224
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.349899
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.780029
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.862101
object-new (click) 2406 2818 2 36 0 0% 0 0 0.998882
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.314855
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.760113
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.179406
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.820467
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.797125
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.297369
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.753203
setivar (click) 2783 3726 3 46 0 0% 0 0 1.266665
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.419269
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.708302
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.487686
structaref (click) 4407 9095 3 88 0 0% 0 0 2.362102
structaset (click) 4113 5834 3 70 0 0% 0 0 1.821762
throw (click) 5953 4624 5 53 0 0% 0 0 1.796152

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.