Ruby Benchmarks

Details for Benchmarks at 2026-05-16 01:09:58 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.2% faster than CRuby 4.1.0dev
  • 10.1% faster than YJIT 3.4.7
On railsbench it is
  • 122.5% faster than CRuby 4.1.0dev
  • 17.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 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 90 5 93 50 201 50 242
chunky-png 5 31 5 30 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 422 5 440 50 620 50 684
liquid-compile 5 421 5 521 50 583 50 854
liquid-render 5 171 5 175 50 432 50 467
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 209 50 253 50 310
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 248 50 247
ruby-lsp 5 163 5 159 50 240 50 228
sequel 5 429 5 457 50 598 50 661
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 164 5 174 50 183 50 215
addressable-join 5 75 5 85 50 65 50 85
addressable-merge 5 161 5 162 50 223 50 249
addressable-new 5 354 5 353 50 520 50 554
addressable-normalize 5 53 5 58 50 60 50 72
addressable-parse 5 103 5 109 50 104 50 123
addressable-setters 5 185 5 191 50 235 50 262
addressable-to-s 5 164 5 173 50 181 50 213
binarytrees 5 82 5 86 50 136 50 148
blurhash 5 84 5 83 50 143 50 145
erubi 5 138 5 150 50 141 50 157
etanni 5 101 5 78 50 72 50 46
fannkuchredux 5 55 5 58 50 100 50 109
fluentd 5 61 5 60 50 22 50 35
gcbench 5 10 5 10 50 10 50 18
graphql 5 373 5 464 50 569 50 974
graphql-native 5 58 5 89 50 21 50 75
knucleotide 5 163 5 144 50 117 50 99
lee 5 23 5 30 50 10 50 19
matmul 5 53 5 55 50 88 50 98
nbody 5 250 5 274 50 661 50 703
nqueens 5 119 5 125 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 182 50 697 50 813
protoboeuf-encode 5 201 5 195 50 800 50 803
rack 5 440 5 462 50 707 50 809
ruby-json 5 83 5 113 50 50 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 221 50 250 50 284
sudoku 5 48 5 50 50 155 50 168
tinygql 5 41 5 43 50 40 50 55
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 455 50 460
attr_accessor 5 157 5 185 50 1833 50 1900
cfunc_itself 5 348 5 314 50 1255 50 1259
fib 5 125 5 130 50 939 50 939
getivar 5 211 5 306 50 2312 50 2418
getivar-module 5 103 5 136 50 88 50 262
keyword_args 5 102 5 107 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 465 50 296 50 1515
object-new-initialize 5 169 5 233 50 259 50 1029
object-new-no-escape 5 81 5 138 50 89 50 520
respond_to 5 139 5 124 50 3903 50 3900
ruby-xor 5 246 5 230 50 1305 50 1296
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 107 5 107 50 304 50 276
send_rubyfunc_block 5 196 5 211 50 1372 50 1376
setivar 5 359 5 393 50 4929 50 4972
setivar_object 5 341 5 302 50 762 50 596
setivar_young 5 344 5 302 50 810 50 609
str_concat 5 391 5 450 50 1202 50 1150
structaref 5 153 5 190 50 1802 50 1877
structaset 5 197 5 229 50 368 50 476
throw 5 1108 5 1439 50 1442 50 1918

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) 1562123 1356851 203 2657 0 0% 0 0 78.096919
chunky-png (click) 324425 322464 79 1376 1 0% 0 0 38.213587
erubi-rails (click) 1390672 1171039 268 3626 23 0% 0 0 94.066572
hexapdf (click) 1535806 1322846 594 15791 44 0% 0 0 427.77898
liquid-c (click) 566605 477590 114 2240 5 0% 0 0 58.666156
liquid-compile (click) 487083 418634 146 2745 2 0% 0 0 78.806756
liquid-render (click) 672014 558368 131 2963 8 0% 0 0 78.345631
lobsters (click) 8580155 7304987 3126 63616 122 0% 0 0 2043.472844
mail (click) 876862 876130 345 7738 40 0% 0 0 208.969404
psych-load (click) 292171 259627 61 833 2 0% 0 0 23.772717
railsbench (click) 3357259 2857203 1592 19753 105 0% 0 0 536.708408
rubocop (click) 5801497 5018165 3002 57335 128 0% 6 0 1739.55277
ruby-lsp (click) 1052905 964995 409 7472 47 0% 1 0 200.336575
sequel (click) 510941 446151 11 119 0 0% 0 0 4.039457
shipit (click) 7190066 6180858 3120 50279 148 0% 0 0 1616.543615
addressable-equality (click) 325505 309337 44 1380 1 0% 0 0 33.27059
addressable-getters (click) 285837 252299 26 863 0 0% 0 0 20.428146
addressable-join (click) 291575 269318 24 945 0 0% 0 0 23.378842
addressable-merge (click) 291568 271908 27 900 0 0% 0 0 21.637848
addressable-new (click) 266598 245019 21 569 0 0% 0 0 13.786446
addressable-normalize (click) 319962 269950 43 1327 1 0% 0 0 31.519651
addressable-parse (click) 287604 277089 26 880 0 0% 0 0 20.87391
addressable-setters (click) 266268 246755 20 582 0 0% 0 0 14.132689
addressable-to-s (click) 285445 251253 26 849 0 0% 0 0 20.184512
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.767338
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.816912
erubi (click) 252223 233645 6 134 0 0% 0 0 3.787805
etanni (click) 32989 26478 8 114 0 0% 0 0 3.408795
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.83271
fluentd (click) 492911 440001 7 116 0 0% 0 0 3.659377
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.30365
graphql (click) 417720 372977 73 1931 19 0% 0 0 52.572447
graphql-native (click) 360127 320538 39 532 0 0% 0 0 13.6181
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.730179
lee (click) 318484 277204 49 1093 0 0% 0 0 30.288256
matmul (click) 11103 4709 8 136 0 0% 0 0 4.097752
nbody (click) 14448 21176 6 251 0 0% 0 0 6.122336
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.227873
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 107.115299
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.710914
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.481236
rack (click) 287081 237307 35 586 0 0% 0 0 14.644555
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.722788
rubyboy (click) 707746 640307 154 6873 42 0% 0 0 163.277743
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.180732
splay (click) 34953 22682 9 175 0 0% 0 0 5.291046
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.838966
tinygql (click) 303951 257004 59 1032 5 0% 0 0 26.513917
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1865.710049
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 478.085186
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.105391
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.507532
fib (click) 2659 2995 3 30 0 0% 0 0 1.100343
getivar (click) 3789 6778 3 79 0 0% 0 0 1.947257
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.347673
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.825722
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.912442
object-new (click) 2406 2818 2 36 0 0% 0 0 1.004715
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.29189
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.948467
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.131441
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799295
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.801968
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.277334
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.733932
setivar (click) 2783 3726 3 46 0 0% 0 0 1.248175
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.380722
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.735441
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.425046
structaref (click) 4407 9095 3 88 0 0% 0 0 2.35692
structaset (click) 4113 5834 3 70 0 0% 0 0 1.795236
throw (click) 5953 4624 5 53 0 0% 0 0 1.733805

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.