Ruby Benchmarks

Details for Benchmarks at 2026-07-23 00:56:00 UTC

YJIT metrics from the ruby-bench suite using Ruby 8645a948c0.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.0% faster than CRuby 4.1.0dev
  • 5.0% faster than YJIT 3.4.7
On railsbench it is
  • 108.4% faster than CRuby 4.1.0dev
  • 9.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 10 minutes
aarch64 runtime: 7 hours, 53 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 96 50 201 50 210
chunky-png 5 31 5 30 50 34 50 24
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 442 50 619 50 656
liquid-compile 5 421 5 521 50 582 50 836
liquid-il 5 67 5 69 50 116 50 124
liquid-render 5 173 5 174 50 430 50 459
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 253 50 288
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 248 50 241
ruby-lsp 5 158 5 157 50 215 50 223
sequel 5 429 5 467 50 597 50 661
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 16
addressable-getters 5 165 5 170 50 183 50 206
addressable-join 5 75 5 84 50 66 50 79
addressable-merge 5 160 5 157 50 223 50 229
addressable-new 5 353 5 345 50 520 50 514
addressable-normalize 5 53 5 60 50 60 50 69
addressable-parse 5 103 5 106 50 104 50 118
addressable-setters 5 186 5 184 50 235 50 249
addressable-to-s 5 164 5 170 50 182 50 205
binarytrees 5 82 5 89 50 136 50 169
blurhash 5 84 5 84 50 145 50 145
erubi 5 138 5 153 50 131 50 163
etanni 5 100 5 82 50 72 50 50
fannkuchredux 5 55 5 57 50 101 50 109
fluentd 5 62 5 61 50 27 50 30
gcbench 5 10 5 10 50 10 50 10
graphql 5 372 5 458 50 569 50 905
graphql-native 5 57 5 83 50 21 50 57
knucleotide 5 163 5 150 50 117 50 103
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 53 50 88 50 93
nbody 5 250 5 250 50 663 50 599
nqueens 5 119 5 127 50 554 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 698 50 673
protoboeuf-encode 5 201 5 201 50 804 50 817
rack 5 446 5 463 50 712 50 738
ruby-json 5 84 5 112 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 201 50 250 50 236
string_malloc_pressure 5 146 5 34 50 101 50 10
sudoku 5 48 5 49 50 155 50 164
tinygql 5 41 5 43 50 35 50 51
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 457 50 453
attr_accessor 5 157 5 175 50 1830 50 1882
cfunc_itself 5 348 5 319 50 1255 50 1258
fib 5 125 5 134 50 939 50 939
getivar 5 210 5 322 50 2315 50 2431
getivar-module 5 103 5 144 50 89 50 118
keyword_args 5 102 5 101 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 482 50 297 50 1534
object-new-initialize 5 169 5 257 50 259 50 525
object-new-no-escape 5 81 5 139 50 89 50 362
respond_to 5 139 5 122 50 3903 50 3891
ruby-xor 5 247 5 238 50 1305 50 1303
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 106 5 101 50 303 50 291
send_rubyfunc_block 5 196 5 201 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 298
setivar 5 359 5 348 50 4931 50 4915
setivar_object 5 341 5 271 50 763 50 726
setivar_young 5 342 5 271 50 808 50 728
str_concat 5 390 5 427 50 1199 50 1066
structaref 5 153 5 189 50 1797 50 1878
structaset 5 198 5 223 50 369 50 498
throw 5 1108 5 1324 50 1443 50 1696

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) 1562966 1322546 204 2675 0 0% 0 0 77.85207
chunky-png (click) 321066 288910 79 1372 1 0% 0 0 39.420408
erubi-rails (click) 1380098 1123013 268 3630 23 0% 0 0 93.82178
hexapdf (click) 1524232 1346859 593 15681 45 0% 0 0 423.698198
liquid-c (click) 557142 473255 114 2226 5 0% 0 0 58.052788
liquid-compile (click) 477626 447252 146 2679 2 0% 0 0 72.396201
liquid-il (click) 613993 559479 70 2717 0 0% 0 0 79.298452
liquid-render (click) 667344 609979 131 2945 8 0% 0 0 76.623781
lobsters (click) 8519059 7183675 3127 62963 125 0% 0 0 2012.748626
mail (click) 864466 844266 345 7654 40 0% 0 0 205.099082
psych-load (click) 285132 264601 60 820 2 0% 0 0 22.763117
railsbench (click) 3355810 2911698 1591 19737 105 0% 0 0 532.870055
rubocop (click) 5764377 4976627 3000 57020 132 0% 6 0 1627.212521
ruby-lsp (click) 1043799 964281 408 7425 47 0% 1 0 195.092489
sequel (click) 521692 438980 11 119 0 0% 0 0 3.800372
shipit (click) 6875093 5884361 3136 49933 147 0% 0 0 1611.604533
addressable-equality (click) 323236 260101 44 1381 1 0% 0 0 33.34116
addressable-getters (click) 283519 235767 26 863 0 0% 0 0 20.455675
addressable-join (click) 288061 242716 24 941 0 0% 0 0 22.350077
addressable-merge (click) 289037 238747 27 896 0 0% 0 0 21.424825
addressable-new (click) 263873 219842 21 563 0 0% 0 0 13.543324
addressable-normalize (click) 317639 253433 43 1327 1 0% 0 0 31.326493
addressable-parse (click) 286231 237637 26 880 0 0% 0 0 21.021218
addressable-setters (click) 264068 213931 20 582 0 0% 0 0 14.131483
addressable-to-s (click) 283127 226529 26 849 0 0% 0 0 20.118606
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.756948
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.844882
erubi (click) 230586 210387 6 134 0 0% 0 0 3.939615
etanni (click) 33079 34728 8 114 0 0% 0 0 3.433203
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.841971
fluentd (click) 511458 473955 7 116 0 0% 0 0 3.598725
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.526751
graphql (click) 414872 373914 74 1939 18 0% 0 0 52.270068
graphql-native (click) 354315 286054 39 532 0 0% 0 0 13.619127
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.663323
lee (click) 317298 303164 50 1101 0 0% 0 0 30.170264
matmul (click) 11103 4709 8 136 0 0% 0 0 4.0945
nbody (click) 14448 21176 6 251 0 0% 0 0 6.132971
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.183885
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.37841
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.23842
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.349491
rack (click) 284749 262535 35 581 0 0% 0 0 14.483635
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.753094
rubyboy (click) 705302 630515 154 6871 42 0% 0 0 162.524535
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.277836
splay (click) 34682 14303 9 175 0 0% 0 0 5.311761
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.740735
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.896878
tinygql (click) 300497 264749 59 1024 5 0% 0 0 25.869856
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1879.243223
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 472.60913
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.04447
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.49091
fib (click) 2659 2995 3 30 0 0% 0 0 1.105298
getivar (click) 3789 6778 3 79 0 0% 0 0 1.879081
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.259846
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807384
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.882546
object-new (click) 2406 2818 2 36 0 0% 0 0 0.998194
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.310259
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.701373
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.122816
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.76573
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.791161
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.303765
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.720726
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.066631
setivar (click) 2783 3726 3 46 0 0% 0 0 1.284261
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.403515
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.740819
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.471823
structaref (click) 4407 9095 3 88 0 0% 0 0 2.318626
structaset (click) 4113 5834 3 70 0 0% 0 0 1.785818
throw (click) 5953 4624 5 53 0 0% 0 0 1.774664

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.