Ruby Benchmarks

Details for Benchmarks at 2026-03-07 00:49:16 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.2% faster than CRuby 4.1.0dev
  • 8.1% faster than YJIT 3.4.7
On railsbench it is
  • 112.5% faster than CRuby 4.1.0dev
  • 15.4% faster than YJIT 3.4.7
x86_64 runtime: 10 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 93 5 99 50 201 50 242
chunky-png 5 31 5 33 50 32 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 432 50 622 50 642
liquid-compile 5 417 5 483 50 553 50 729
liquid-render 5 171 5 179 50 433 50 453
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 197 50 252 50 277
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 161 50 248 50 255
ruby-lsp 5 163 5 164 50 230 50 236
sequel 5 429 5 437 50 603 50 604
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 12
addressable-getters 5 164 5 170 50 184 50 195
addressable-join 5 74 5 80 50 66 50 76
addressable-merge 5 159 5 160 50 223 50 229
addressable-new 5 348 5 355 50 525 50 517
addressable-normalize 5 54 5 55 50 59 50 60
addressable-parse 5 104 5 106 50 104 50 113
addressable-setters 5 185 5 189 50 228 50 241
addressable-to-s 5 163 5 170 50 183 50 195
binarytrees 5 82 5 87 50 136 50 149
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 150 50 120 50 159
etanni 5 99 5 74 50 71 50 44
fannkuchredux 5 55 5 57 50 102 50 105
fluentd 5 57 5 66 50 20 50 34
gcbench 5 10 5 10 50 10 50 10
graphql 5 374 5 474 50 570 50 978
graphql-native 5 57 5 89 50 22 50 69
knucleotide 5 163 5 160 50 118 50 113
lee 5 23 5 31 50 10 50 10
matmul 5 51 5 50 50 94 50 98
nbody 5 246 5 269 50 676 50 699
nqueens 5 116 5 124 50 556 50 580
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 182 50 707 50 758
protoboeuf-encode 5 197 5 200 50 830 50 752
rack 5 439 5 451 50 713 50 721
ruby-json 5 81 5 98 50 46 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 231 50 244 50 290
sudoku 5 48 5 49 50 157 50 170
tinygql 5 41 5 44 50 36 50 51
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 38 5 41 50 454 50 456
attr_accessor 5 157 5 196 50 1835 50 1920
cfunc_itself 5 347 5 359 50 1255 50 1259
fib 5 124 5 144 50 940 50 939
getivar 5 218 5 288 50 2313 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 63 50 63
object-new 5 268 5 421 50 295 50 921
object-new-initialize 5 168 5 246 50 259 50 742
object-new-no-escape 5 81 5 131 50 89 50 377
respond_to 5 139 5 139 50 3888 50 3904
ruby-xor 5 236 5 255 50 1313 50 1299
send_bmethod 5 117 5 120 50 5538 50 4526
send_cfunc_block 5 107 5 107 50 353 50 382
send_rubyfunc_block 5 250 5 249 50 6924 50 6919
setivar 5 359 5 443 50 4924 50 5015
setivar_object 5 341 5 305 50 751 50 634
setivar_young 5 341 5 308 50 799 50 663
str_concat 5 391 5 438 50 1200 50 1198
structaref 5 157 5 200 50 1809 50 1899
structaset 5 202 5 258 50 397 50 499
throw 5 1089 5 1384 50 1414 50 1820

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) 1554246 1334788 203 2662 0 0% 0 0 75.807642
chunky-png (click) 320809 328324 79 1376 1 0% 0 0 39.039458
erubi-rails (click) 1378939 1225543 268 3644 22 0% 0 0 96.799143
hexapdf (click) 1525475 1305070 593 15712 44 0% 0 0 434.387603
liquid-c (click) 559889 505805 114 2232 5 0% 0 0 59.111482
liquid-compile (click) 480533 439547 146 2714 2 0% 0 0 78.639554
liquid-render (click) 665281 619614 131 2959 8 0% 0 0 79.450712
lobsters (click) 8698995 7330562 3125 64219 122 0% 0 0 2096.258126
mail (click) 871203 822128 345 7728 40 0% 0 0 212.946658
psych-load (click) 288728 265660 61 831 2 0% 0 0 23.563961
railsbench (click) 3354510 2862967 1592 19741 97 0% 0 0 551.548793
rubocop (click) 5782645 5055127 3002 57114 125 0% 6 0 1654.05107
ruby-lsp (click) 1042591 945820 408 7446 46 0% 1 0 203.686833
sequel (click) 505433 464494 11 119 0 0% 0 0 3.870588
shipit (click) 7473361 6228717 3440 55763 173 0% 1 0 1814.055825
addressable-equality (click) 317751 252683 44 1384 1 0% 0 0 34.12791
addressable-getters (click) 267462 240665 26 863 0 0% 0 0 20.592994
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.44697
addressable-merge (click) 283124 247322 27 896 0 0% 0 0 22.110135
addressable-new (click) 262320 200223 21 633 0 0% 0 0 15.455345
addressable-normalize (click) 313034 255658 43 1329 1 0% 0 0 32.775559
addressable-parse (click) 279908 254175 26 880 0 0% 0 0 21.372515
addressable-setters (click) 258150 238919 20 582 0 0% 0 0 14.433086
addressable-to-s (click) 277595 202672 26 853 0 0% 0 0 20.867261
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.824933
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.237484
erubi (click) 247937 221669 6 134 0 0% 0 0 3.868968
etanni (click) 32951 34772 8 114 0 0% 0 0 3.435017
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.054265
fluentd (click) 488259 436546 7 116 0 0% 0 0 3.735866
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.505373
graphql (click) 409414 357069 73 1909 19 0% 0 0 53.381132
graphql-native (click) 354373 282999 39 532 0 0% 0 0 13.996299
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.714137
lee (click) 317758 253235 49 1102 0 0% 0 0 31.103489
matmul (click) 11103 4709 8 136 0 0% 0 0 4.20086
nbody (click) 14448 21176 6 251 0 0% 0 0 6.162958
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.352548
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.363474
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.861792
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.29845
rack (click) 284233 284730 35 586 0 0% 0 0 15.317592
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.754839
rubyboy (click) 701024 635715 154 6877 42 0% 0 0 167.5352
rubykon (click) 149667 148880 138 2117 4 0% 0 0 56.816669
splay (click) 34953 22682 9 175 0 0% 0 0 5.312192
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.989367
tinygql (click) 300483 279308 59 1025 5 0% 0 0 27.094072
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1950.016305
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.36501
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.11258
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.519174
fib (click) 2659 2995 3 30 0 0% 0 0 1.284706
getivar (click) 3789 6778 3 79 0 0% 0 0 1.912085
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.365378
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.838605
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.920233
object-new (click) 2406 2818 2 36 0 0% 0 0 1.054919
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.311334
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.004439
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.136434
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.819735
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.771548
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.823521
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.450032
setivar (click) 2783 3726 3 46 0 0% 0 0 1.286388
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.44914
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.722414
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.475336
structaref (click) 4407 9095 3 88 0 0% 0 0 2.365657
structaset (click) 4113 5834 3 70 0 0% 0 0 1.806309
throw (click) 5953 4624 5 53 0 0% 0 0 1.759543

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.