Ruby Benchmarks

Details for Benchmarks at 2026-06-14 01:30:51 UTC

YJIT metrics from the ruby-bench suite using Ruby 9a90ac21ff.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.8% faster than CRuby 4.1.0dev
  • 9.3% faster than YJIT 3.4.7
On railsbench it is
  • 118.4% faster than CRuby 4.1.0dev
  • 15.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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 92 5 96 50 198 50 210
chunky-png 5 31 5 31 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 442 50 619 50 681
liquid-compile 5 418 5 518 50 579 50 843
liquid-render 5 173 5 172 50 435 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 206 50 253 50 308
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 247 50 248
ruby-lsp 5 163 5 156 50 223 50 229
sequel 5 429 5 459 50 597 50 656
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 19
addressable-getters 5 165 5 172 50 182 50 212
addressable-join 5 75 5 83 50 64 50 84
addressable-merge 5 161 5 160 50 221 50 246
addressable-new 5 350 5 350 50 520 50 553
addressable-normalize 5 53 5 57 50 60 50 72
addressable-parse 5 104 5 107 50 104 50 122
addressable-setters 5 186 5 189 50 233 50 262
addressable-to-s 5 165 5 172 50 182 50 211
binarytrees 5 81 5 84 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 135 5 155 50 140 50 158
etanni 5 100 5 82 50 71 50 49
fannkuchredux 5 55 5 57 50 101 50 105
fluentd 5 62 5 59 50 20 50 23
gcbench 5 10 5 10 50 10 50 16
graphql 5 359 5 455 50 530 50 969
graphql-native 5 59 5 89 50 22 50 68
knucleotide 5 163 5 141 50 118 50 94
lee 5 22 5 31 50 10 50 17
matmul 5 53 5 52 50 88 50 95
nbody 5 250 5 246 50 663 50 691
nqueens 5 119 5 128 50 555 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 176 50 698 50 794
protoboeuf-encode 5 201 5 199 50 804 50 804
rack 5 437 5 470 50 711 50 802
ruby-json 5 83 5 113 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
splay 5 208 5 205 50 250 50 247
sudoku 5 48 5 50 50 155 50 168
tinygql 5 41 5 43 50 40 50 54
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 457 50 457
attr_accessor 5 157 5 180 50 1832 50 1887
cfunc_itself 5 348 5 311 50 1255 50 1258
fib 5 124 5 136 50 939 50 939
getivar 5 210 5 325 50 2306 50 2432
getivar-module 5 103 5 138 50 89 50 283
keyword_args 5 102 5 107 50 1240 50 1245
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 478 50 299 50 1443
object-new-initialize 5 168 5 235 50 260 50 983
object-new-no-escape 5 80 5 138 50 89 50 509
respond_to 5 139 5 122 50 3899 50 3895
ruby-xor 5 247 5 238 50 1305 50 1313
send_bmethod 5 118 5 108 50 5539 50 4526
send_cfunc_block 5 105 5 104 50 304 50 292
send_rubyfunc_block 5 196 5 198 50 1372 50 1375
setivar 5 359 5 399 50 4929 50 4979
setivar_object 5 344 5 306 50 765 50 594
setivar_young 5 342 5 307 50 809 50 604
str_concat 5 391 5 437 50 1200 50 1109
structaref 5 153 5 180 50 1802 50 1864
structaset 5 199 5 231 50 371 50 487
throw 5 1110 5 1394 50 1443 50 1796

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) 1563480 1342209 203 2671 0 0% 0 0 74.75598
chunky-png (click) 306418 276783 79 1376 1 0% 0 0 38.041922
erubi-rails (click) 1384370 1195073 268 3626 23 0% 0 0 94.717468
hexapdf (click) 1534330 1337691 594 15771 44 0% 0 0 429.74404
liquid-c (click) 566617 526742 114 2240 5 0% 0 0 59.218448
liquid-compile (click) 471605 383565 146 2669 2 0% 0 0 73.871552
liquid-render (click) 672979 560024 131 2963 8 0% 0 0 77.604461
lobsters (click) 8564520 7263485 3124 63442 122 0% 0 0 2133.688921
mail (click) 875701 833682 345 7738 40 0% 0 0 209.080774
psych-load (click) 292700 277326 61 829 2 0% 0 0 23.343689
railsbench (click) 3358498 2801701 1592 19748 105 0% 0 0 537.972295
rubocop (click) 5803310 5045462 3002 57350 128 0% 6 0 1636.871528
ruby-lsp (click) 1048691 927299 409 7470 47 0% 1 0 202.024499
sequel (click) 510077 412077 11 119 0 0% 0 0 3.970049
shipit (click) 7075395 6004629 3123 49948 147 0% 0 0 1609.513942
addressable-equality (click) 325512 292953 44 1380 1 0% 0 0 33.294266
addressable-getters (click) 281798 239052 26 863 0 0% 0 0 20.379259
addressable-join (click) 291218 252600 24 941 0 0% 0 0 23.165114
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.507474
addressable-new (click) 266080 228090 21 563 0 0% 0 0 13.620358
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.844561
addressable-parse (click) 270244 264607 26 880 0 0% 0 0 20.615551
addressable-setters (click) 262224 241695 20 582 0 0% 0 0 14.02049
addressable-to-s (click) 275487 254646 26 849 0 0% 0 0 19.838578
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.79057
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.838695
erubi (click) 252235 241817 6 134 0 0% 0 0 3.831007
etanni (click) 32752 34339 8 114 0 0% 0 0 3.43076
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.86634
fluentd (click) 515304 450125 7 116 0 0% 0 0 3.630208
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.364941
graphql (click) 417737 372977 73 1931 19 0% 0 0 52.862412
graphql-native (click) 361087 346750 39 532 0 0% 0 0 13.640076
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.765765
lee (click) 311797 260161 49 1093 0 0% 0 0 30.026099
matmul (click) 11103 4709 8 136 0 0% 0 0 4.10139
nbody (click) 14448 21176 6 251 0 0% 0 0 6.172952
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.268687
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.383508
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.548679
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.911237
rack (click) 286700 245141 35 581 0 0% 0 0 14.54338
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.82435
rubyboy (click) 708516 641776 154 6871 42 0% 0 0 163.538564
rubykon (click) 147788 154811 138 2094 4 0% 0 0 55.021196
splay (click) 34617 22483 9 175 0 0% 0 0 5.239134
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.93094
tinygql (click) 286341 244179 59 1026 5 0% 0 0 26.450213
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1864.176338
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.205218
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.109665
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.494562
fib (click) 2659 2995 3 30 0 0% 0 0 1.107021
getivar (click) 3789 6778 3 79 0 0% 0 0 1.944676
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.343295
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.834372
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.91387
object-new (click) 2406 2818 2 36 0 0% 0 0 1.021007
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.300561
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.760236
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.148884
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.784697
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.849555
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.315694
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.729776
setivar (click) 2783 3726 3 46 0 0% 0 0 1.230858
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.429164
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.751076
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.415573
structaref (click) 4407 9095 3 88 0 0% 0 0 2.37122
structaset (click) 4113 5834 3 70 0 0% 0 0 1.80639
throw (click) 5953 4624 5 53 0 0% 0 0 1.752496

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.