Ruby Benchmarks

Details for Benchmarks at 2026-04-03 00:58:10 UTC

YJIT metrics from the ruby-bench suite using Ruby 6200574d4a.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.6% faster than CRuby 4.1.0dev
  • 6.6% faster than YJIT 3.4.7
On railsbench it is
  • 114.5% faster than CRuby 4.1.0dev
  • 13.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 46 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 89 5 95 50 199 50 236
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 425 5 430 50 620 50 637
liquid-compile 5 421 5 480 50 582 50 741
liquid-render 5 173 5 172 50 433 50 449
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 202 50 254 50 272
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 245 50 259
ruby-lsp 5 155 5 168 50 238 50 241
sequel 5 429 5 434 50 582 50 607
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 10
addressable-getters 5 165 5 167 50 182 50 199
addressable-join 5 73 5 79 50 63 50 74
addressable-merge 5 161 5 153 50 221 50 225
addressable-new 5 352 5 343 50 520 50 526
addressable-normalize 5 53 5 56 50 60 50 62
addressable-parse 5 103 5 103 50 104 50 111
addressable-setters 5 185 5 175 50 231 50 229
addressable-to-s 5 164 5 167 50 181 50 198
binarytrees 5 82 5 85 50 135 50 162
blurhash 5 84 5 84 50 145 50 145
erubi 5 140 5 140 50 125 50 142
etanni 5 99 5 79 50 72 50 45
fannkuchredux 5 55 5 56 50 100 50 102
fluentd 5 56 5 62 50 20 50 27
gcbench 5 10 5 10 50 10 50 16
graphql 5 371 5 443 50 570 50 948
graphql-native 5 58 5 88 50 21 50 70
knucleotide 5 163 5 141 50 117 50 95
lee 5 23 5 29 50 10 50 11
matmul 5 53 5 56 50 87 50 96
nbody 5 250 5 275 50 663 50 705
nqueens 5 119 5 126 50 554 50 577
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 697 50 830
protoboeuf-encode 5 201 5 196 50 799 50 824
rack 5 443 5 430 50 725 50 689
ruby-json 5 83 5 105 50 50 50 83
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 222 50 250 50 283
sudoku 5 48 5 49 50 155 50 160
tinygql 5 40 5 41 50 38 50 52
30k_ifelse 5 28 5 28 50 178 50 184
30k_methods 5 38 5 39 50 456 50 458
attr_accessor 5 157 5 179 50 1833 50 1889
cfunc_itself 5 348 5 306 50 1255 50 1259
fib 5 125 5 134 50 939 50 939
getivar 5 216 5 293 50 2314 50 2407
getivar-module 5 103 5 130 50 88 50 263
keyword_args 5 102 5 103 50 1239 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 267 5 473 50 297 50 1483
object-new-initialize 5 169 5 254 50 259 50 944
object-new-no-escape 5 79 5 139 50 89 50 508
respond_to 5 139 5 132 50 3899 50 3895
ruby-xor 5 247 5 229 50 1305 50 1294
send_bmethod 5 118 5 115 50 5538 50 4526
send_cfunc_block 5 106 5 102 50 354 50 383
send_rubyfunc_block 5 244 5 261 50 6921 50 6914
setivar 5 359 5 470 50 4931 50 5035
setivar_object 5 341 5 347 50 763 50 668
setivar_young 5 341 5 347 50 809 50 695
str_concat 5 390 5 448 50 1200 50 1177
structaref 5 153 5 183 50 1797 50 1865
structaset 5 198 5 220 50 370 50 478
throw 5 1110 5 1357 50 1442 50 1729

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) 1557598 1345499 203 2660 0 0% 0 0 75.986877
chunky-png (click) 322722 296152 79 1384 1 0% 0 0 39.176548
erubi-rails (click) 1385483 1212944 268 3638 23 0% 0 0 95.973459
hexapdf (click) 1526119 1288217 593 15708 44 0% 0 0 432.250718
liquid-c (click) 562603 466669 114 2236 5 0% 0 0 59.354023
liquid-compile (click) 484738 434493 146 2728 2 0% 0 0 77.017027
liquid-render (click) 665952 569826 131 2959 8 0% 0 0 79.434506
lobsters (click) 8682496 7279428 3126 64178 122 0% 0 0 2093.096443
mail (click) 872336 830219 345 7728 40 0% 0 0 210.637842
psych-load (click) 292264 219383 61 831 2 0% 0 0 23.719864
railsbench (click) 3359322 2900601 1592 19756 104 0% 0 0 543.320226
rubocop (click) 5785636 4960609 3002 57127 128 0% 6 0 1739.951577
ruby-lsp (click) 1045488 866280 408 7436 46 0% 1 0 202.602912
sequel (click) 499313 443021 11 119 0 0% 0 0 3.902282
shipit (click) 6931957 5984569 3136 50474 147 0% 0 0 1635.981964
addressable-equality (click) 320463 270952 44 1415 1 0% 0 0 34.606471
addressable-getters (click) 278766 219772 26 863 0 0% 0 0 21.382187
addressable-join (click) 283645 268513 24 945 0 0% 0 0 24.328415
addressable-merge (click) 287446 242967 27 900 0 0% 0 0 22.49193
addressable-new (click) 259975 245814 21 595 0 0% 0 0 15.158946
addressable-normalize (click) 316793 267128 43 1371 1 0% 0 0 33.217149
addressable-parse (click) 282008 230384 26 886 0 0% 0 0 22.423986
addressable-setters (click) 258918 222192 20 582 0 0% 0 0 14.533506
addressable-to-s (click) 283289 232936 26 889 0 0% 0 0 21.962031
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.80762
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.109286
erubi (click) 232948 185806 6 134 0 0% 0 0 3.927337
etanni (click) 32981 26478 8 114 0 0% 0 0 3.489668
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.942026
fluentd (click) 491301 439036 7 116 0 0% 0 0 3.769783
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.501117
graphql (click) 411043 365465 73 1926 19 0% 0 0 53.446365
graphql-native (click) 355062 282550 39 532 0 0% 0 0 13.783001
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.74966
lee (click) 318710 277502 49 1099 0 0% 0 0 31.196071
matmul (click) 11103 4709 8 136 0 0% 0 0 4.142364
nbody (click) 14448 21176 6 251 0 0% 0 0 6.280467
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.325745
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 107.34476
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.106654
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.692812
rack (click) 289821 258268 35 677 0 0% 0 0 17.808398
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.75877
rubyboy (click) 705930 655017 154 6873 42 0% 0 0 167.509964
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.638929
splay (click) 34953 22682 9 175 0 0% 0 0 5.302667
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.025954
tinygql (click) 302307 263421 59 1037 5 0% 0 0 27.366729
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1882.234385
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.757194
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.130376
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.522178
fib (click) 2659 2995 3 30 0 0% 0 0 1.121791
getivar (click) 3789 6778 3 79 0 0% 0 0 1.918679
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.381168
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.816336
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.890634
object-new (click) 2406 2818 2 36 0 0% 0 0 1.003179
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.329528
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.065219
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.191739
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.793351
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.822532
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.809075
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.479841
setivar (click) 2783 3726 3 46 0 0% 0 0 1.301866
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.42769
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.752442
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.493708
structaref (click) 4407 9095 3 88 0 0% 0 0 2.375589
structaset (click) 4113 5834 3 70 0 0% 0 0 1.821997
throw (click) 5953 4624 5 53 0 0% 0 0 1.771006

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.