Ruby Benchmarks

Details for Benchmarks at 2026-06-10 01:23:27 UTC

YJIT metrics from the ruby-bench suite using Ruby 8c434d03bd.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 102.5% faster than CRuby 4.1.0dev
  • 11.4% faster than YJIT 3.4.7
On railsbench it is
  • 120.3% faster than CRuby 4.1.0dev
  • 16.5% 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 91 5 96 50 193 50 243
chunky-png 5 32 5 31 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 447 50 619 50 679
liquid-compile 5 420 5 522 50 580 50 867
liquid-render 5 172 5 171 50 431 50 471
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 254 50 312
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 153 50 247 50 254
ruby-lsp 5 159 5 158 50 223 50 235
sequel 5 423 5 461 50 598 50 661
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 20
addressable-getters 5 164 5 175 50 182 50 219
addressable-join 5 75 5 85 50 66 50 86
addressable-merge 5 162 5 159 50 221 50 254
addressable-new 5 353 5 353 50 519 50 563
addressable-normalize 5 53 5 58 50 59 50 74
addressable-parse 5 103 5 108 50 104 50 124
addressable-setters 5 185 5 190 50 234 50 266
addressable-to-s 5 165 5 174 50 182 50 216
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 82 5 83 50 145 50 145
erubi 5 139 5 143 50 124 50 144
etanni 5 100 5 77 50 72 50 43
fannkuchredux 5 55 5 57 50 100 50 107
fluentd 5 62 5 60 50 20 50 26
gcbench 5 10 5 10 50 10 50 18
graphql 5 370 5 454 50 571 50 967
graphql-native 5 57 5 90 50 22 50 59
knucleotide 5 163 5 143 50 117 50 96
lee 5 22 5 31 50 10 50 17
matmul 5 53 5 52 50 88 50 98
nbody 5 250 5 244 50 662 50 689
nqueens 5 119 5 129 50 555 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 175 50 698 50 800
protoboeuf-encode 5 198 5 201 50 802 50 797
rack 5 440 5 468 50 703 50 808
ruby-json 5 84 5 113 50 50 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 222 50 250 50 272
sudoku 5 47 5 49 50 155 50 170
tinygql 5 41 5 43 50 40 50 55
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 439 50 459
attr_accessor 5 157 5 187 50 1835 50 1898
cfunc_itself 5 348 5 330 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 210 5 354 50 2304 50 2451
getivar-module 5 103 5 144 50 89 50 286
keyword_args 5 96 5 105 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 267 5 479 50 297 50 1537
object-new-initialize 5 169 5 237 50 259 50 1028
object-new-no-escape 5 81 5 122 50 89 50 528
respond_to 5 139 5 125 50 3901 50 3903
ruby-xor 5 247 5 241 50 1305 50 1309
send_bmethod 5 118 5 115 50 5538 50 4527
send_cfunc_block 5 106 5 105 50 305 50 291
send_rubyfunc_block 5 196 5 202 50 1372 50 1375
setivar 5 359 5 402 50 4930 50 4979
setivar_object 5 342 5 305 50 762 50 590
setivar_young 5 342 5 305 50 810 50 608
str_concat 5 391 5 442 50 1199 50 1100
structaref 5 153 5 188 50 1799 50 1891
structaset 5 197 5 221 50 370 50 487
throw 5 1110 5 1403 50 1441 50 1725

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) 1562494 1341914 203 2673 0 0% 0 0 77.694
chunky-png (click) 321569 303124 79 1376 1 0% 0 0 37.95294
erubi-rails (click) 1385318 1254101 268 3626 23 0% 0 0 100.177854
hexapdf (click) 1534079 1337417 593 15767 44 0% 0 0 428.079726
liquid-c (click) 566617 485782 114 2240 5 0% 0 0 59.103552
liquid-compile (click) 478538 368039 146 2669 2 0% 0 0 73.759731
liquid-render (click) 672979 560024 131 2963 8 0% 0 0 77.543674
lobsters (click) 8556704 7321608 3122 63333 122 0% 0 0 2012.721657
mail (click) 873664 806818 345 7738 40 0% 0 0 207.927694
psych-load (click) 291748 267478 61 829 2 0% 0 0 23.440156
railsbench (click) 3357877 2727136 1592 19741 105 0% 0 0 540.840477
rubocop (click) 5803821 5038542 3002 57344 127 0% 6 0 1620.297839
ruby-lsp (click) 1051885 906271 409 7470 47 0% 1 0 199.098905
sequel (click) 510796 413332 11 119 0 0% 0 0 4.155253
shipit (click) 6860743 5758683 3135 50031 147 0% 0 0 1585.467834
addressable-equality (click) 325512 276569 44 1380 1 0% 0 0 33.505009
addressable-getters (click) 285844 219531 26 863 0 0% 0 0 20.273414
addressable-join (click) 290027 275658 24 941 0 0% 0 0 23.001094
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.417745
addressable-new (click) 265130 242818 21 563 0 0% 0 0 13.504738
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.548267
addressable-parse (click) 288561 254174 26 880 0 0% 0 0 21.238115
addressable-setters (click) 265292 212634 20 582 0 0% 0 0 14.094136
addressable-to-s (click) 284540 258155 26 849 0 0% 0 0 20.202595
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.742999
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.851775
erubi (click) 251285 199221 6 134 0 0% 0 0 3.848356
etanni (click) 32989 26478 8 114 0 0% 0 0 3.427226
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.894625
fluentd (click) 516398 434733 7 116 0 0% 0 0 3.645578
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.333525
graphql (click) 416827 379939 73 1931 19 0% 0 0 52.894311
graphql-native (click) 361087 346750 39 532 0 0% 0 0 13.465777
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.650059
lee (click) 321767 305925 49 1093 0 0% 0 0 30.196146
matmul (click) 11103 4709 8 136 0 0% 0 0 4.121247
nbody (click) 14448 21176 6 251 0 0% 0 0 6.145995
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.246266
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.489849
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.438848
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.829929
rack (click) 287943 238901 35 581 0 0% 0 0 14.544379
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.740648
rubyboy (click) 708516 641776 154 6871 42 0% 0 0 162.912809
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.68133
splay (click) 34617 22483 9 175 0 0% 0 0 5.227999
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.912636
tinygql (click) 300845 278379 59 1026 5 0% 0 0 26.215544
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1870.323627
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.301346
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.069793
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.524327
fib (click) 2659 2995 3 30 0 0% 0 0 1.076204
getivar (click) 3789 6778 3 79 0 0% 0 0 1.93047
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.310377
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.812807
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.873951
object-new (click) 2406 2818 2 36 0 0% 0 0 1.017127
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.280722
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.770076
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.11791
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.802021
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.818186
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.281349
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.727561
setivar (click) 2783 3726 3 46 0 0% 0 0 1.248716
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.404222
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.745911
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.434465
structaref (click) 4407 9095 3 88 0 0% 0 0 2.383289
structaset (click) 4113 5834 3 70 0 0% 0 0 1.768529
throw (click) 5953 4624 5 53 0 0% 0 0 1.772423

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.