Ruby Benchmarks

Details for Benchmarks at 2026-05-20 01:21:14 UTC

YJIT metrics from the ruby-bench suite using Ruby 8638931df2.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.2% faster than CRuby 4.1.0dev
  • 10.8% faster than YJIT 3.4.7
On railsbench it is
  • 121.3% faster than CRuby 4.1.0dev
  • 17.4% 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 91 5 95 50 204 50 226
chunky-png 5 32 5 31 50 32 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 446 50 624 50 687
liquid-compile 5 417 5 520 50 580 50 858
liquid-render 5 172 5 174 50 435 50 470
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 207 50 252 50 311
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 247 50 252
ruby-lsp 5 156 5 160 50 224 50 228
sequel 5 426 5 463 50 586 50 661
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 174 50 184 50 216
addressable-join 5 73 5 85 50 66 50 86
addressable-merge 5 160 5 160 50 222 50 252
addressable-new 5 351 5 351 50 513 50 561
addressable-normalize 5 53 5 57 50 60 50 73
addressable-parse 5 103 5 108 50 103 50 124
addressable-setters 5 184 5 185 50 232 50 260
addressable-to-s 5 164 5 173 50 183 50 215
binarytrees 5 82 5 86 50 136 50 147
blurhash 5 84 5 83 50 145 50 145
erubi 5 137 5 151 50 139 50 151
etanni 5 100 5 80 50 71 50 46
fannkuchredux 5 55 5 57 50 100 50 106
fluentd 5 58 5 61 50 21 50 28
gcbench 5 10 5 10 50 10 50 17
graphql 5 356 5 460 50 531 50 957
graphql-native 5 57 5 91 50 20 50 72
knucleotide 5 163 5 146 50 117 50 100
lee 5 23 5 30 50 10 50 18
matmul 5 53 5 52 50 88 50 98
nbody 5 250 5 256 50 662 50 702
nqueens 5 117 5 125 50 554 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 698 50 782
protoboeuf-encode 5 199 5 196 50 802 50 800
rack 5 443 5 458 50 708 50 798
ruby-json 5 83 5 115 50 51 50 95
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 274
sudoku 5 48 5 49 50 155 50 168
tinygql 5 41 5 43 50 40 50 54
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 457 50 452
attr_accessor 5 157 5 184 50 1831 50 1897
cfunc_itself 5 348 5 312 50 1255 50 1259
fib 5 125 5 133 50 939 50 938
getivar 5 210 5 311 50 2314 50 2425
getivar-module 5 103 5 121 50 89 50 280
keyword_args 5 102 5 102 50 1240 50 1242
loops-times 5 23 5 24 50 63 50 62
object-new 5 268 5 471 50 298 50 1522
object-new-initialize 5 168 5 233 50 259 50 1022
object-new-no-escape 5 81 5 138 50 89 50 519
respond_to 5 139 5 123 50 3895 50 3901
ruby-xor 5 247 5 230 50 1306 50 1299
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 106 5 106 50 307 50 291
send_rubyfunc_block 5 196 5 206 50 1372 50 1376
setivar 5 359 5 408 50 4930 50 4987
setivar_object 5 341 5 312 50 273 50 598
setivar_young 5 341 5 312 50 808 50 611
str_concat 5 391 5 451 50 1200 50 1138
structaref 5 153 5 188 50 1799 50 1872
structaset 5 197 5 222 50 369 50 484
throw 5 1109 5 1314 50 1443 50 1683

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) 1562434 1341155 203 2657 0 0% 0 0 73.936225
chunky-png (click) 307356 252914 79 1376 1 0% 0 0 38.468624
erubi-rails (click) 1390496 1261372 268 3626 23 0% 0 0 94.572984
hexapdf (click) 1535146 1330120 593 15778 44 0% 0 0 429.421952
liquid-c (click) 567333 478613 114 2255 5 0% 0 0 59.481542
liquid-compile (click) 487440 411435 146 2736 2 0% 0 0 78.245393
liquid-render (click) 654954 546129 131 2963 8 0% 0 0 77.839466
lobsters (click) 8581745 7405582 3124 63654 122 0% 0 0 2065.930909
mail (click) 876862 876130 345 7738 40 0% 0 0 209.363894
psych-load (click) 293121 269475 61 833 2 0% 0 0 23.985415
railsbench (click) 3359610 2917845 1592 19757 105 0% 0 0 537.959098
rubocop (click) 5803889 5111566 3002 57333 128 0% 6 0 1628.167541
ruby-lsp (click) 1053743 917167 409 7472 47 0% 1 0 201.992944
sequel (click) 510941 437991 11 119 0 0% 0 0 4.424815
shipit (click) 6928820 5859313 3135 50347 147 0% 0 0 1617.886301
addressable-equality (click) 325729 284903 44 1378 1 0% 0 0 33.595254
addressable-getters (click) 285837 227723 26 863 0 0% 0 0 20.776999
addressable-join (click) 277772 236234 24 1005 0 0% 0 0 24.718688
addressable-merge (click) 273544 233465 27 900 0 0% 0 0 21.409956
addressable-new (click) 266598 220443 21 569 0 0% 0 0 13.817483
addressable-normalize (click) 302284 281832 43 1329 1 0% 0 0 32.127835
addressable-parse (click) 288554 270558 26 880 0 0% 0 0 21.269367
addressable-setters (click) 264226 236262 20 582 0 0% 0 0 13.981126
addressable-to-s (click) 285445 251253 26 849 0 0% 0 0 20.267112
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.757887
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.745267
erubi (click) 252223 217281 6 134 0 0% 0 0 3.843963
etanni (click) 32989 26478 8 114 0 0% 0 0 3.426605
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.787894
fluentd (click) 493861 400717 7 116 0 0% 0 0 3.631803
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.363763
graphql (click) 399701 375501 73 1931 18 0% 0 0 52.853342
graphql-native (click) 342111 299380 39 532 0 0% 0 0 13.869512
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.651833
lee (click) 321755 305925 49 1093 0 0% 0 0 30.280359
matmul (click) 11103 4709 8 136 0 0% 0 0 4.124605
nbody (click) 14448 21176 6 251 0 0% 0 0 6.142918
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.261284
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.847571
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.486057
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.005012
rack (click) 290479 242972 35 628 0 0% 0 0 15.788155
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.843092
rubyboy (click) 690865 628298 154 6877 42 0% 0 0 164.203098
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.596567
splay (click) 34953 22682 9 175 0 0% 0 0 5.289861
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.941714
tinygql (click) 303138 281168 59 1032 5 0% 0 0 26.7621
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1871.942658
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.064435
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.079198
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.524371
fib (click) 2659 2995 3 30 0 0% 0 0 1.094316
getivar (click) 3789 6778 3 79 0 0% 0 0 1.917864
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.319013
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.826266
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.915027
object-new (click) 2406 2818 2 36 0 0% 0 0 1.00091
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.312806
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.950258
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.117364
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.757502
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.769982
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.330891
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.809449
setivar (click) 2783 3726 3 46 0 0% 0 0 1.240938
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.432782
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.721863
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.408095
structaref (click) 4407 9095 3 88 0 0% 0 0 2.312583
structaset (click) 4113 5834 3 70 0 0% 0 0 1.79046
throw (click) 5953 4624 5 53 0 0% 0 0 1.760033

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.