Ruby Benchmarks

Details for Benchmarks at 2026-03-09 00:52:51 UTC

YJIT metrics from the ruby-bench suite using Ruby 8ca12b54eb.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.7% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 110.2% faster than CRuby 4.1.0dev
  • 13.9% faster than YJIT 3.4.7
x86_64 runtime: 10 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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 100 50 199 50 242
chunky-png 5 31 5 32 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 430 50 618 50 645
liquid-compile 5 418 5 484 50 579 50 710
liquid-render 5 171 5 178 50 436 50 445
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 197 50 253 50 259
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 246 50 253
ruby-lsp 5 156 5 163 50 223 50 233
sequel 5 426 5 438 50 576 50 610
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 13
addressable-getters 5 164 5 174 50 183 50 201
addressable-join 5 74 5 79 50 66 50 75
addressable-merge 5 159 5 162 50 221 50 229
addressable-new 5 353 5 355 50 520 50 529
addressable-normalize 5 53 5 55 50 59 50 62
addressable-parse 5 103 5 107 50 103 50 113
addressable-setters 5 184 5 187 50 229 50 244
addressable-to-s 5 164 5 171 50 182 50 201
binarytrees 5 82 5 87 50 136 50 149
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 150 50 137 50 154
etanni 5 98 5 75 50 71 50 44
fannkuchredux 5 55 5 48 50 102 50 89
fluentd 5 56 5 68 50 20 50 35
gcbench 5 10 5 10 50 10 50 10
graphql 5 370 5 480 50 571 50 969
graphql-native 5 57 5 88 50 22 50 69
knucleotide 5 164 5 158 50 117 50 111
lee 5 23 5 31 50 10 50 10
matmul 5 51 5 50 50 95 50 98
nbody 5 246 5 270 50 674 50 701
nqueens 5 116 5 124 50 557 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 170 5 183 50 706 50 780
protoboeuf-encode 5 197 5 203 50 834 50 778
rack 5 446 5 456 50 710 50 729
ruby-json 5 81 5 102 50 46 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 210 5 233 50 243 50 281
sudoku 5 48 5 49 50 156 50 169
tinygql 5 42 5 44 50 39 50 52
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 457 50 452
attr_accessor 5 157 5 192 50 1834 50 1911
cfunc_itself 5 349 5 347 50 1255 50 1259
fib 5 123 5 141 50 940 50 940
getivar 5 215 5 285 50 2314 50 2398
getivar-module 5 104 5 121 50 90 50 258
keyword_args 5 100 5 104 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 63
object-new 5 268 5 420 50 295 50 923
object-new-initialize 5 168 5 246 50 259 50 754
object-new-no-escape 5 81 5 132 50 89 50 376
respond_to 5 139 5 140 50 3885 50 3907
ruby-xor 5 236 5 239 50 1313 50 1298
send_bmethod 5 116 5 119 50 5539 50 4526
send_cfunc_block 5 107 5 107 50 353 50 382
send_rubyfunc_block 5 251 5 250 50 6924 50 6918
setivar 5 359 5 439 50 4922 50 5014
setivar_object 5 341 5 305 50 751 50 629
setivar_young 5 343 5 308 50 799 50 664
str_concat 5 391 5 440 50 1200 50 1176
structaref 5 156 5 179 50 1814 50 1867
structaset 5 204 5 251 50 397 50 496
throw 5 1088 5 1379 50 1406 50 1792

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) 1554351 1333801 203 2651 0 0% 0 0 75.378593
chunky-png (click) 321334 271355 79 1376 1 0% 0 0 39.394923
erubi-rails (click) 1374977 1138164 268 3639 22 0% 0 0 97.424225
hexapdf (click) 1526101 1280948 593 15712 44 0% 0 0 439.979961
liquid-c (click) 558928 520538 114 2236 5 0% 0 0 59.506688
liquid-compile (click) 478983 453074 146 2704 2 0% 0 0 79.139722
liquid-render (click) 664672 544702 131 2959 8 0% 0 0 79.499723
lobsters (click) 8721125 7388829 3126 64402 120 0% 0 0 2124.707302
mail (click) 873227 832303 345 7728 40 0% 0 0 214.28984
psych-load (click) 289235 257388 61 831 2 0% 0 0 23.841548
railsbench (click) 3349550 2906243 1592 19723 97 0% 0 0 550.682049
rubocop (click) 5779722 5028318 3003 57105 125 0% 6 0 1692.537201
ruby-lsp (click) 1041713 985403 409 7472 47 0% 1 0 205.545878
sequel (click) 503025 437921 11 119 0 0% 0 0 4.077155
shipit (click) 7127008 5981121 3300 52143 169 0% 0 0 1704.697172
addressable-equality (click) 318017 285113 44 1399 1 0% 0 0 34.860025
addressable-getters (click) 276877 242948 26 863 0 0% 0 0 20.863361
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.751147
addressable-merge (click) 282199 229365 27 896 0 0% 0 0 22.140666
addressable-new (click) 257960 228451 21 563 0 0% 0 0 14.224235
addressable-normalize (click) 312029 246024 43 1329 1 0% 0 0 32.91621
addressable-parse (click) 280314 229355 26 894 0 0% 0 0 22.259764
addressable-setters (click) 258150 238919 20 582 0 0% 0 0 14.681952
addressable-to-s (click) 264721 228921 26 849 0 0% 0 0 20.534033
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.823047
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.118398
erubi (click) 247937 221669 6 134 0 0% 0 0 3.887093
etanni (click) 32951 34772 8 114 0 0% 0 0 3.471179
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.077629
fluentd (click) 488958 445235 7 116 0 0% 0 0 3.749324
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.489958
graphql (click) 409900 390183 73 1909 19 0% 0 0 53.50962
graphql-native (click) 353539 338909 39 532 0 0% 0 0 13.837114
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.420643
lee (click) 316949 268194 49 1099 0 0% 0 0 31.178617
matmul (click) 11103 4709 8 136 0 0% 0 0 4.184728
nbody (click) 14448 21176 6 251 0 0% 0 0 6.274533
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.375198
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.332324
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 74.064065
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.32657
rack (click) 287862 265180 35 656 0 0% 0 0 16.988255
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.882756
rubyboy (click) 704416 621413 154 6873 42 0% 0 0 168.119241
rubykon (click) 149667 148880 138 2117 4 0% 0 0 56.98748
splay (click) 34953 22682 9 175 0 0% 0 0 5.369031
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.008145
tinygql (click) 299993 245409 59 1031 5 0% 0 0 27.424712
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1954.759158
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.259023
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.136069
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.506971
fib (click) 2659 2995 3 30 0 0% 0 0 1.148168
getivar (click) 3789 6778 3 79 0 0% 0 0 1.973812
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.346627
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.83304
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.9534
object-new (click) 2406 2818 2 36 0 0% 0 0 1.079564
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.305887
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.01773
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.156947
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.780895
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.828415
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.794437
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.494403
setivar (click) 2783 3726 3 46 0 0% 0 0 1.292559
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.427073
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.741714
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.511804
structaref (click) 4407 9095 3 88 0 0% 0 0 2.384718
structaset (click) 4113 5834 3 70 0 0% 0 0 1.832233
throw (click) 5953 4624 5 53 0 0% 0 0 1.773779

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.