Ruby Benchmarks

Details for Benchmarks at 2026-05-22 01:20:11 UTC

YJIT metrics from the ruby-bench suite using Ruby 7012f365f9.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.1% faster than CRuby 4.1.0dev
  • 11.6% faster than YJIT 3.4.7
On railsbench it is
  • 120.5% faster than CRuby 4.1.0dev
  • 17.9% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 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 97 50 198 50 244
chunky-png 5 32 5 30 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 439 50 619 50 676
liquid-compile 5 420 5 525 50 546 50 866
liquid-render 5 172 5 171 50 433 50 465
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 210 50 254 50 307
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 247 50 254
ruby-lsp 5 156 5 160 50 225 50 226
sequel 5 428 5 454 50 598 50 657
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 30 50 12 50 19
addressable-getters 5 165 5 173 50 184 50 215
addressable-join 5 74 5 85 50 66 50 86
addressable-merge 5 161 5 159 50 222 50 249
addressable-new 5 354 5 350 50 518 50 559
addressable-normalize 5 53 5 60 50 60 50 73
addressable-parse 5 103 5 108 50 103 50 124
addressable-setters 5 184 5 189 50 233 50 267
addressable-to-s 5 164 5 174 50 182 50 217
binarytrees 5 82 5 83 50 136 50 149
blurhash 5 84 5 83 50 145 50 145
erubi 5 137 5 148 50 141 50 153
etanni 5 100 5 79 50 73 50 46
fannkuchredux 5 55 5 57 50 100 50 109
fluentd 5 56 5 60 50 20 50 28
gcbench 5 10 5 10 50 10 50 18
graphql 5 360 5 463 50 572 50 963
graphql-native 5 59 5 85 50 22 50 72
knucleotide 5 164 5 147 50 117 50 100
lee 5 23 5 30 50 10 50 18
matmul 5 53 5 53 50 88 50 99
nbody 5 250 5 246 50 663 50 702
nqueens 5 119 5 124 50 555 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 184 50 697 50 811
protoboeuf-encode 5 200 5 193 50 802 50 812
rack 5 441 5 467 50 713 50 817
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 223 50 250 50 282
sudoku 5 48 5 49 50 155 50 169
tinygql 5 40 5 43 50 34 50 54
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 455 50 460
attr_accessor 5 157 5 179 50 1833 50 1892
cfunc_itself 5 348 5 311 50 1255 50 1259
fib 5 125 5 128 50 939 50 938
getivar 5 216 5 325 50 2313 50 2437
getivar-module 5 103 5 138 50 89 50 284
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 470 50 296 50 1519
object-new-initialize 5 169 5 234 50 259 50 1026
object-new-no-escape 5 80 5 138 50 89 50 518
respond_to 5 139 5 116 50 3904 50 3898
ruby-xor 5 247 5 225 50 1305 50 1296
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 106 5 107 50 305 50 289
send_rubyfunc_block 5 196 5 211 50 1371 50 1375
setivar 5 359 5 362 50 4930 50 4940
setivar_object 5 341 5 292 50 765 50 648
setivar_young 5 341 5 292 50 808 50 679
str_concat 5 391 5 449 50 1200 50 1141
structaref 5 153 5 178 50 1798 50 1854
structaset 5 198 5 211 50 370 50 483
throw 5 1108 5 1312 50 1443 50 1709

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) 1562822 1301049 203 2658 0 0% 0 0 74.159844
chunky-png (click) 325370 274968 79 1376 1 0% 0 0 38.135469
erubi-rails (click) 1390985 1178605 268 3671 23 0% 0 0 95.613342
hexapdf (click) 1538298 1350716 594 15821 44 0% 0 0 431.554713
liquid-c (click) 564729 458586 114 2252 5 0% 0 0 59.17574
liquid-compile (click) 487474 419504 146 2741 2 0% 0 0 77.75778
liquid-render (click) 670648 598480 131 2963 8 0% 0 0 77.958897
lobsters (click) 8575812 7284387 3127 63601 125 0% 0 0 2032.19367
mail (click) 876862 876130 345 7738 40 0% 0 0 208.321648
psych-load (click) 293121 269475 61 833 2 0% 0 0 23.774812
railsbench (click) 3361728 2855230 1592 19741 105 0% 0 0 534.388963
rubocop (click) 5799770 5041087 3002 57323 127 0% 6 0 1633.35671
ruby-lsp (click) 1053512 966026 409 7472 47 0% 1 0 202.134379
sequel (click) 507831 434074 11 119 0 0% 0 0 4.028574
shipit (click) 7179569 6091532 3122 50202 148 0% 0 0 1596.049296
addressable-equality (click) 322225 280508 44 1380 1 0% 0 0 33.472698
addressable-getters (click) 285837 252299 26 863 0 0% 0 0 20.537373
addressable-join (click) 291575 244742 24 945 0 0% 0 0 23.571748
addressable-merge (click) 291568 247332 27 900 0 0% 0 0 21.76924
addressable-new (click) 263323 224387 21 569 0 0% 0 0 13.804484
addressable-normalize (click) 320912 279798 43 1327 1 0% 0 0 31.695654
addressable-parse (click) 286092 250782 26 886 0 0% 0 0 21.258242
addressable-setters (click) 263565 243541 20 588 0 0% 0 0 14.264165
addressable-to-s (click) 282170 230621 26 849 0 0% 0 0 19.964792
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.744843
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.832441
erubi (click) 252223 233645 6 134 0 0% 0 0 3.856852
etanni (click) 32989 26478 8 114 0 0% 0 0 3.41623
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.842341
fluentd (click) 493861 392593 7 116 0 0% 0 0 3.592227
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.33197
graphql (click) 417720 389361 73 1931 19 0% 0 0 52.615558
graphql-native (click) 361014 338520 39 532 0 0% 0 0 13.666763
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.655326
lee (click) 321755 305925 49 1093 0 0% 0 0 30.158404
matmul (click) 11103 4709 8 136 0 0% 0 0 4.071486
nbody (click) 14448 21176 6 251 0 0% 0 0 6.137351
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.294993
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.425418
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.40369
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.953627
rack (click) 290479 251164 35 628 0 0% 0 0 15.696229
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.782691
rubyboy (click) 708696 633751 154 6873 42 0% 0 0 162.6793
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.329284
splay (click) 34953 22682 9 175 0 0% 0 0 5.308966
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.695153
tinygql (click) 285682 260177 59 1026 5 0% 0 0 26.585005
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.73868
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.759002
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.160501
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.482626
fib (click) 2659 2995 3 30 0 0% 0 0 1.105484
getivar (click) 3789 6778 3 79 0 0% 0 0 1.900176
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.339077
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.824347
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.91748
object-new (click) 2406 2818 2 36 0 0% 0 0 1.004015
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.288376
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.906898
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13296
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.785116
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.77987
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.318781
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.733488
setivar (click) 2783 3726 3 46 0 0% 0 0 1.220164
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.412027
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.725565
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.416255
structaref (click) 4407 9095 3 88 0 0% 0 0 2.339241
structaset (click) 4113 5834 3 70 0 0% 0 0 1.765575
throw (click) 5953 4624 5 53 0 0% 0 0 1.764044

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.