Ruby Benchmarks

Details for Benchmarks at 2026-04-22 01:01:05 UTC

YJIT metrics from the ruby-bench suite using Ruby 5bd3e85ea1.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.1% faster than CRuby 4.1.0dev
  • 8.5% faster than YJIT 3.4.7
On railsbench it is
  • 116.0% faster than CRuby 4.1.0dev
  • 16.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 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 91 5 95 50 191 50 238
chunky-png 5 32 5 31 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 438 50 621 50 656
liquid-compile 5 420 5 480 50 546 50 743
liquid-render 5 172 5 172 50 433 50 458
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 199 50 255 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 153 50 248 50 245
ruby-lsp 5 159 5 159 50 221 50 229
sequel 5 429 5 441 50 591 50 626
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 165 50 183 50 194
addressable-join 5 75 5 79 50 65 50 71
addressable-merge 5 160 5 151 50 222 50 219
addressable-new 5 352 5 337 50 522 50 507
addressable-normalize 5 53 5 53 50 60 50 59
addressable-parse 5 104 5 102 50 103 50 110
addressable-setters 5 185 5 177 50 233 50 237
addressable-to-s 5 164 5 164 50 182 50 194
binarytrees 5 82 5 85 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 133 5 145 50 120 50 150
etanni 5 100 5 77 50 72 50 45
fannkuchredux 5 55 5 56 50 101 50 103
fluentd 5 58 5 60 50 21 50 30
gcbench 5 10 5 10 50 10 50 15
graphql 5 370 5 417 50 568 50 949
graphql-native 5 58 5 88 50 21 50 69
knucleotide 5 163 5 145 50 117 50 99
lee 5 23 5 29 50 10 50 13
matmul 5 53 5 55 50 88 50 98
nbody 5 250 5 275 50 662 50 704
nqueens 5 119 5 121 50 554 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 698 50 800
protoboeuf-encode 5 200 5 194 50 807 50 830
rack 5 446 5 435 50 717 50 703
ruby-json 5 84 5 105 50 50 50 84
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 224 50 250 50 284
sudoku 5 48 5 49 50 155 50 160
tinygql 5 40 5 40 50 36 50 51
30k_ifelse 5 28 5 29 50 186 50 185
30k_methods 5 38 5 39 50 455 50 457
attr_accessor 5 157 5 177 50 1832 50 1884
cfunc_itself 5 348 5 327 50 1255 50 1259
fib 5 125 5 134 50 939 50 939
getivar 5 211 5 297 50 2315 50 2336
getivar-module 5 103 5 135 50 89 50 267
keyword_args 5 102 5 101 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 471 50 297 50 1516
object-new-initialize 5 169 5 251 50 255 50 1021
object-new-no-escape 5 81 5 134 50 89 50 516
respond_to 5 139 5 131 50 3902 50 3904
ruby-xor 5 247 5 233 50 1305 50 1294
send_bmethod 5 118 5 116 50 5539 50 4527
send_cfunc_block 5 106 5 107 50 304 50 329
send_rubyfunc_block 5 193 5 203 50 1372 50 1376
setivar 5 359 5 479 50 4930 50 5042
setivar_object 5 341 5 346 50 763 50 651
setivar_young 5 341 5 346 50 810 50 692
str_concat 5 391 5 385 50 1200 50 1174
structaref 5 153 5 174 50 1798 50 1849
structaset 5 197 5 201 50 369 50 470
throw 5 1107 5 1405 50 1443 50 1894

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) 1561737 1355533 203 2716 0 0% 0 0 78.415657
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 37.907106
erubi-rails (click) 1388505 1290538 268 3664 23 0% 0 0 101.087091
hexapdf (click) 1534456 1320814 593 15809 44 0% 0 0 428.125428
liquid-c (click) 566018 436042 114 2240 5 0% 0 0 58.574689
liquid-compile (click) 484204 424068 146 2746 2 0% 0 0 81.031826
liquid-render (click) 669340 662307 131 2963 8 0% 0 0 77.240121
lobsters (click) 8591840 7293306 3126 63839 122 0% 0 0 2070.869912
mail (click) 876352 850882 345 7738 40 0% 0 0 207.05631
psych-load (click) 291419 275467 61 833 2 0% 0 0 23.405802
railsbench (click) 3356024 2780686 1592 19741 104 0% 0 0 533.546995
rubocop (click) 5789475 4946142 3002 57193 127 0% 6 0 1633.828997
ruby-lsp (click) 1046005 841537 409 7472 47 0% 1 0 199.202595
sequel (click) 499369 445414 11 121 0 0% 0 0 4.340321
shipit (click) 7218505 6128743 3117 50234 148 0% 0 0 1599.704654
addressable-equality (click) 321431 272212 44 1380 1 0% 0 0 34.007409
addressable-getters (click) 279334 187597 26 869 0 0% 0 0 22.534087
addressable-join (click) 287506 240390 24 945 0 0% 0 0 27.58917
addressable-merge (click) 284252 263709 27 900 0 0% 0 0 23.69905
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.514955
addressable-normalize (click) 316840 291825 43 1327 1 0% 0 0 33.621418
addressable-parse (click) 281172 270473 26 880 0 0% 0 0 22.102504
addressable-setters (click) 243755 203798 20 588 0 0% 0 0 15.779589
addressable-to-s (click) 281740 247235 26 853 0 0% 0 0 21.973153
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.721058
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.81582
erubi (click) 250466 214973 6 134 0 0% 0 0 3.863564
etanni (click) 32989 26478 8 114 0 0% 0 0 3.393249
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.765288
fluentd (click) 475905 394103 7 116 0 0% 0 0 3.586001
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.576624
graphql (click) 414863 361635 73 1931 19 0% 0 0 52.517413
graphql-native (click) 358270 319054 39 532 0 0% 0 0 13.779963
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.694333
lee (click) 318824 285785 49 1099 0 0% 0 0 30.276068
matmul (click) 11103 4709 8 136 0 0% 0 0 4.075239
nbody (click) 14448 21176 6 251 0 0% 0 0 6.12875
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.19813
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.91184
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.56183
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.999629
rack (click) 292459 277903 35 656 0 0% 0 0 17.602118
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.685047
rubyboy (click) 708824 592928 154 6871 42 0% 0 0 161.558309
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.161345
splay (click) 34953 22682 9 175 0 0% 0 0 5.133587
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.71805
tinygql (click) 304373 274325 59 1026 5 0% 0 0 26.296795
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1852.719166
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.521865
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.07962
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.490796
fib (click) 2659 2995 3 30 0 0% 0 0 1.091802
getivar (click) 3789 6778 3 79 0 0% 0 0 1.917488
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334191
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.850959
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.884561
object-new (click) 2406 2818 2 36 0 0% 0 0 0.976721
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.247698
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.989425
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.12433
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.761458
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.794118
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.269624
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.731879
setivar (click) 2783 3726 3 46 0 0% 0 0 1.244007
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.411523
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.684883
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.384896
structaref (click) 4407 9095 3 88 0 0% 0 0 2.289125
structaset (click) 4113 5834 3 70 0 0% 0 0 1.780295
throw (click) 5953 4624 5 53 0 0% 0 0 1.736021

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.