Ruby Benchmarks

Details for Benchmarks at 2026-05-05 01:06:02 UTC

YJIT metrics from the ruby-bench suite using Ruby 06fc5c2482.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 103.8% faster than CRuby 4.1.0dev
  • 8.5% faster than YJIT 3.4.7
On railsbench it is
  • 119.8% faster than CRuby 4.1.0dev
  • 14.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 51 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 87 50 199 50 231
chunky-png 5 32 5 31 50 34 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 432 50 619 50 670
liquid-compile 5 407 5 466 50 549 50 743
liquid-render 5 172 5 172 50 432 50 463
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 199 50 253 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 154 50 248 50 248
ruby-lsp 5 163 5 152 50 225 50 235
sequel 5 428 5 447 50 579 50 620
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 26 50 12 50 12
addressable-getters 5 165 5 161 50 184 50 197
addressable-join 5 75 5 75 50 65 50 74
addressable-merge 5 161 5 143 50 223 50 226
addressable-new 5 356 5 316 50 517 50 528
addressable-normalize 5 53 5 53 50 60 50 60
addressable-parse 5 103 5 99 50 103 50 110
addressable-setters 5 185 5 170 50 233 50 234
addressable-to-s 5 165 5 160 50 182 50 197
binarytrees 5 82 5 86 50 136 50 173
blurhash 5 84 5 84 50 145 50 145
erubi 5 132 5 150 50 138 50 153
etanni 5 99 5 80 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 108
fluentd 5 56 5 62 50 29 50 27
gcbench 5 10 5 10 50 10 50 17
graphql 5 372 5 389 50 568 50 939
graphql-native 5 58 5 72 50 22 50 70
knucleotide 5 163 5 142 50 117 50 96
lee 5 23 5 30 50 10 50 14
matmul 5 53 5 54 50 88 50 96
nbody 5 250 5 272 50 662 50 690
nqueens 5 119 5 123 50 553 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 162 50 697 50 791
protoboeuf-encode 5 200 5 197 50 798 50 794
rack 5 443 5 443 50 719 50 725
ruby-json 5 83 5 108 50 49 50 85
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 211 50 250 50 290
sudoku 5 48 5 49 50 155 50 158
tinygql 5 42 5 38 50 40 50 51
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 452 50 458
attr_accessor 5 156 5 189 50 1831 50 1902
cfunc_itself 5 346 5 321 50 1255 50 1259
fib 5 125 5 136 50 939 50 939
getivar 5 211 5 290 50 2307 50 2403
getivar-module 5 103 5 123 50 89 50 259
keyword_args 5 102 5 102 50 1240 50 1242
loops-times 5 23 5 24 50 63 50 57
object-new 5 268 5 468 50 297 50 1504
object-new-initialize 5 169 5 157 50 260 50 1017
object-new-no-escape 5 81 5 100 50 89 50 515
respond_to 5 139 5 125 50 3893 50 3897
ruby-xor 5 247 5 236 50 1305 50 1311
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 106 5 106 50 304 50 293
send_rubyfunc_block 5 195 5 205 50 1372 50 1376
setivar 5 359 5 425 50 4930 50 5003
setivar_object 5 341 5 284 50 760 50 592
setivar_young 5 342 5 284 50 808 50 598
str_concat 5 391 5 450 50 1200 50 1164
structaref 5 153 5 187 50 1799 50 1869
structaset 5 198 5 221 50 370 50 479
throw 5 1110 5 1327 50 1445 50 1809

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) 1559245 1312048 203 2667 0 0% 0 0 73.810782
chunky-png (click) 323060 304986 79 1376 1 0% 0 0 38.21157
erubi-rails (click) 1377264 1259803 268 3626 23 0% 0 0 99.592932
hexapdf (click) 1532893 1303118 594 15778 44 0% 0 0 428.151403
liquid-c (click) 563702 507266 114 2240 5 0% 0 0 59.158224
liquid-compile (click) 482338 421880 146 2733 2 0% 0 0 81.981941
liquid-render (click) 670242 589849 131 2963 8 0% 0 0 77.910143
lobsters (click) 8569016 7321506 3126 63615 122 0% 0 0 2048.197837
mail (click) 876352 850882 345 7738 40 0% 0 0 208.550277
psych-load (click) 292898 260857 61 833 2 0% 0 0 23.872088
railsbench (click) 3354492 2819805 1592 19757 104 0% 0 0 535.481767
rubocop (click) 5790377 4940222 3002 57197 127 0% 6 0 1647.930839
ruby-lsp (click) 1046984 851005 409 7472 47 0% 1 0 199.445252
sequel (click) 503977 413633 11 119 0 0% 0 0 5.063699
shipit (click) 7215862 6034104 3119 50252 148 0% 0 0 1636.787819
addressable-equality (click) 319971 270231 44 1415 1 0% 0 0 36.013967
addressable-getters (click) 277671 251334 26 863 0 0% 0 0 22.128926
addressable-join (click) 287506 240390 24 945 0 0% 0 0 24.560552
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 23.866136
addressable-new (click) 260492 230219 21 569 0 0% 0 0 14.381802
addressable-normalize (click) 316840 291825 43 1327 1 0% 0 0 34.130625
addressable-parse (click) 280707 228885 26 880 0 0% 0 0 21.896128
addressable-setters (click) 260318 207585 20 584 0 0% 0 0 16.616511
addressable-to-s (click) 281740 247235 26 853 0 0% 0 0 22.060087
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.768843
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.895038
erubi (click) 248177 195835 6 134 0 0% 0 0 3.900518
etanni (click) 32752 34339 8 114 0 0% 0 0 3.410937
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.846324
fluentd (click) 486750 457310 7 116 0 0% 0 0 3.567103
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.336635
graphql (click) 412821 375738 73 1931 19 0% 0 0 52.828267
graphql-native (click) 356228 300394 39 532 0 0% 0 0 13.800015
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.653653
lee (click) 321532 289155 49 1093 0 0% 0 0 30.152258
matmul (click) 11103 4709 8 136 0 0% 0 0 4.072612
nbody (click) 14448 21176 6 251 0 0% 0 0 6.093824
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.186157
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.667603
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.915777
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.191191
rack (click) 283935 274887 35 581 0 0% 0 0 15.685723
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.806031
rubyboy (click) 709062 666876 154 6875 42 0% 0 0 163.143994
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.221634
splay (click) 34953 22682 9 175 0 0% 0 0 5.219914
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.877239
tinygql (click) 300810 261786 59 1032 5 0% 0 0 26.450862
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1864.029003
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.240348
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.114501
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.512895
fib (click) 2659 2995 3 30 0 0% 0 0 1.111244
getivar (click) 3789 6778 3 79 0 0% 0 0 1.916562
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.33382
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.829916
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.857458
object-new (click) 2406 2818 2 36 0 0% 0 0 0.995506
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.280218
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.957632
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.144358
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.772196
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.811975
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.272511
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.759045
setivar (click) 2783 3726 3 46 0 0% 0 0 1.26524
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.387101
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.728996
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.437627
structaref (click) 4407 9095 3 88 0 0% 0 0 2.355166
structaset (click) 4113 5834 3 70 0 0% 0 0 1.796681
throw (click) 5953 4624 5 53 0 0% 0 0 1.771004

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.