Ruby Benchmarks

Details for Benchmarks at 2026-04-07 00:58:57 UTC

YJIT metrics from the ruby-bench suite using Ruby fa8c919499.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.3% faster than CRuby 4.1.0dev
  • 6.3% faster than YJIT 3.4.7
On railsbench it is
  • 120.7% faster than CRuby 4.1.0dev
  • 15.3% 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 90 5 97 50 200 50 236
chunky-png 5 32 5 30 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 427 50 627 50 640
liquid-compile 5 418 5 465 50 586 50 711
liquid-render 5 172 5 170 50 434 50 449
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 201 50 254 50 287
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 156 50 248 50 253
ruby-lsp 5 153 5 165 50 238 50 237
sequel 5 429 5 434 50 601 50 601
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 13
addressable-getters 5 165 5 166 50 183 50 197
addressable-join 5 74 5 78 50 66 50 74
addressable-merge 5 160 5 150 50 223 50 222
addressable-new 5 352 5 337 50 521 50 521
addressable-normalize 5 53 5 55 50 60 50 61
addressable-parse 5 104 5 102 50 103 50 109
addressable-setters 5 185 5 176 50 233 50 235
addressable-to-s 5 164 5 165 50 183 50 196
binarytrees 5 82 5 84 50 136 50 161
blurhash 5 84 5 84 50 145 50 145
erubi 5 139 5 147 50 126 50 153
etanni 5 99 5 78 50 72 50 46
fannkuchredux 5 55 5 57 50 101 50 105
fluentd 5 56 5 59 50 20 50 26
gcbench 5 10 5 10 50 10 50 16
graphql 5 358 5 447 50 568 50 962
graphql-native 5 58 5 88 50 22 50 61
knucleotide 5 163 5 142 50 117 50 95
lee 5 23 5 29 50 10 50 13
matmul 5 53 5 58 50 88 50 97
nbody 5 250 5 283 50 663 50 705
nqueens 5 119 5 120 50 554 50 577
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 181 50 697 50 804
protoboeuf-encode 5 201 5 195 50 800 50 802
rack 5 442 5 433 50 720 50 698
ruby-json 5 84 5 106 50 50 50 83
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 224 50 250 50 284
sudoku 5 48 5 49 50 155 50 159
tinygql 5 42 5 41 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 450 50 458
attr_accessor 5 157 5 176 50 1833 50 1884
cfunc_itself 5 348 5 317 50 1255 50 1259
fib 5 125 5 133 50 939 50 939
getivar 5 210 5 243 50 2305 50 2412
getivar-module 5 103 5 134 50 89 50 236
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 24 50 63 50 63
object-new 5 268 5 472 50 297 50 1485
object-new-initialize 5 169 5 252 50 260 50 954
object-new-no-escape 5 80 5 132 50 89 50 509
respond_to 5 139 5 131 50 3897 50 3900
ruby-xor 5 247 5 229 50 1305 50 1297
send_bmethod 5 118 5 115 50 5538 50 4526
send_cfunc_block 5 107 5 107 50 305 50 262
send_rubyfunc_block 5 196 5 210 50 1372 50 1376
setivar 5 359 5 467 50 4930 50 5039
setivar_object 5 341 5 350 50 763 50 668
setivar_young 5 341 5 350 50 809 50 692
str_concat 5 391 5 449 50 1200 50 1168
structaref 5 153 5 171 50 1797 50 1848
structaset 5 197 5 212 50 370 50 474
throw 5 1108 5 1384 50 1444 50 1705

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) 1556623 1361571 203 2654 0 0% 0 0 73.407259
chunky-png (click) 327820 317483 79 1411 1 0% 0 0 39.357811
erubi-rails (click) 1379520 1221846 268 3648 23 0% 0 0 94.814098
hexapdf (click) 1529173 1356546 593 15715 44 0% 0 0 430.153379
liquid-c (click) 562884 507623 114 2251 5 0% 0 0 58.960144
liquid-compile (click) 486420 474671 146 2717 2 0% 0 0 77.679299
liquid-render (click) 668962 630743 131 2959 8 0% 0 0 76.812159
lobsters (click) 8591952 7138228 3126 63848 124 0% 0 0 2044.314217
mail (click) 875290 841962 345 7728 40 0% 0 0 208.199289
psych-load (click) 291314 250495 61 831 2 0% 0 0 23.323199
railsbench (click) 3355951 2805881 1592 19723 104 0% 0 0 531.347735
rubocop (click) 5783835 4958886 3002 57109 127 0% 6 0 1630.516839
ruby-lsp (click) 1045807 874846 409 7462 47 0% 1 0 200.212407
sequel (click) 506053 473240 11 119 0 0% 0 0 4.120669
shipit (click) 6899942 5884590 3137 50342 147 0% 0 0 1608.220159
addressable-equality (click) 322136 265005 44 1396 1 0% 0 0 33.133178
addressable-getters (click) 282599 240393 26 905 0 0% 0 0 22.186221
addressable-join (click) 273079 231466 24 1009 0 0% 0 0 24.871403
addressable-merge (click) 286501 224947 27 900 0 0% 0 0 22.272164
addressable-new (click) 265533 234923 21 637 0 0% 0 0 15.842149
addressable-normalize (click) 317150 275293 43 1352 1 0% 0 0 32.444735
addressable-parse (click) 284007 248678 26 886 0 0% 0 0 22.1747
addressable-setters (click) 261317 232878 20 582 0 0% 0 0 14.842259
addressable-to-s (click) 282646 240365 26 877 0 0% 0 0 21.636245
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.738082
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.763851
erubi (click) 251902 200355 6 134 0 0% 0 0 3.874174
etanni (click) 32744 34339 8 114 0 0% 0 0 3.360109
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.818106
fluentd (click) 491488 470964 7 116 0 0% 0 0 3.751259
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.409742
graphql (click) 414856 361870 73 1926 19 0% 0 0 52.49182
graphql-native (click) 357154 333726 39 532 0 0% 0 0 13.467775
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.705585
lee (click) 321659 313816 49 1099 0 0% 0 0 30.476016
matmul (click) 11103 4709 8 136 0 0% 0 0 4.07174
nbody (click) 14448 21176 6 251 0 0% 0 0 6.049112
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.236828
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 105.462473
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.412029
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.142152
rack (click) 291088 243134 35 656 0 0% 0 0 16.606085
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.75832
rubyboy (click) 707821 648606 154 6871 42 0% 0 0 164.408963
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.109441
splay (click) 34953 22682 9 175 0 0% 0 0 5.205915
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.630817
tinygql (click) 305256 275159 59 1037 5 0% 0 0 26.769908
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1872.142288
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.827013
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.081003
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.491574
fib (click) 2659 2995 3 30 0 0% 0 0 1.087485
getivar (click) 3789 6778 3 79 0 0% 0 0 1.919827
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.324284
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.802702
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.870144
object-new (click) 2406 2818 2 36 0 0% 0 0 0.99879
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.307702
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.000354
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.11876
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.804603
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.797292
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.282805
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.723836
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261144
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.426404
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.702892
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.382799
structaref (click) 4407 9095 3 88 0 0% 0 0 2.31403
structaset (click) 4113 5834 3 70 0 0% 0 0 1.769562
throw (click) 5953 4624 5 53 0 0% 0 0 1.78727

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.