Ruby Benchmarks

Details for Benchmarks at 2026-07-14 00:51:04 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.2% faster than CRuby 4.1.0dev
  • 11.1% faster than YJIT 3.4.7
On railsbench it is
  • 122.0% faster than CRuby 4.1.0dev
  • 19.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 12 minutes
aarch64 runtime: 7 hours, 57 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 96 50 200 50 242
chunky-png 5 32 5 31 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 421 5 445 50 627 50 682
liquid-compile 5 421 5 517 50 584 50 844
liquid-render 5 169 5 172 50 432 50 465
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 50 255 50 306
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 154 50 247 50 255
ruby-lsp 5 159 5 161 50 238 50 222
sequel 5 428 5 465 50 595 50 666
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 30 50 12 50 18
addressable-getters 5 164 5 173 50 183 50 209
addressable-join 5 75 5 85 50 66 50 84
addressable-merge 5 161 5 162 50 222 50 242
addressable-new 5 352 5 350 50 520 50 533
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 107 50 105 50 119
addressable-setters 5 187 5 187 50 233 50 251
addressable-to-s 5 165 5 174 50 182 50 209
binarytrees 5 80 5 87 50 136 50 163
blurhash 5 84 5 84 50 145 50 145
erubi 5 140 5 153 50 138 50 162
etanni 5 100 5 80 50 72 50 48
fannkuchredux 5 55 5 58 50 101 50 112
fluentd 5 62 5 58 50 28 50 25
gcbench 5 10 5 10 50 10 50 18
graphql 5 372 5 469 50 569 50 980
graphql-native 5 57 5 91 50 22 50 70
knucleotide 5 163 5 141 50 117 50 94
lee 5 22 5 30 50 10 50 17
matmul 5 53 5 53 50 88 50 100
nbody 5 245 5 247 50 663 50 648
nqueens 5 119 5 128 50 554 50 606
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 187 50 698 50 802
protoboeuf-encode 5 201 5 202 50 800 50 768
rack 5 441 5 473 50 717 50 787
ruby-json 5 84 5 112 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 208 50 250 50 251
string_malloc_pressure 5 147 5 34 50 102 50 10
sudoku 5 48 5 50 50 155 50 164
tinygql 5 42 5 43 50 34 50 56
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 456 50 457
attr_accessor 5 157 5 194 50 1832 50 1909
cfunc_itself 5 346 5 342 50 1255 50 1258
fib 5 124 5 134 50 939 50 938
getivar 5 211 5 311 50 2307 50 2422
getivar-module 5 103 5 130 50 89 50 260
keyword_args 5 102 5 101 50 1240 50 1243
loops-times 5 23 5 24 50 63 50 62
object-new 5 268 5 474 50 296 50 1485
object-new-initialize 5 169 5 220 50 259 50 1005
object-new-no-escape 5 80 5 132 50 89 50 529
respond_to 5 139 5 121 50 3899 50 3894
ruby-xor 5 247 5 236 50 1305 50 1311
send_bmethod 5 118 5 114 50 5539 50 4525
send_cfunc_block 5 106 5 102 50 304 50 302
send_rubyfunc_block 5 195 5 202 50 1371 50 1375
send_rubyfunc_inline 5 30 5 35 50 297 50 297
setivar 5 359 5 433 50 4930 50 5008
setivar_object 5 341 5 317 50 765 50 733
setivar_young 5 341 5 316 50 808 50 750
str_concat 5 390 5 439 50 1202 50 1056
structaref 5 153 5 190 50 1796 50 1878
structaset 5 197 5 224 50 368 50 468
throw 5 1111 5 1332 50 1441 50 1731

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) 1556576 1385437 204 2663 0 0% 0 0 77.060355
chunky-png (click) 324991 274413 79 1376 1 0% 0 0 38.17437
erubi-rails (click) 1382469 1177883 268 3626 23 0% 0 0 93.736622
hexapdf (click) 1532949 1336709 593 15747 44 0% 0 0 425.18706
liquid-c (click) 567278 520049 114 2240 5 0% 0 0 58.440086
liquid-compile (click) 483177 465267 146 2673 2 0% 0 0 72.67277
liquid-render (click) 673640 594291 131 2963 8 0% 0 0 76.860195
lobsters (click) 8567122 7235728 3127 63529 125 0% 0 0 2017.75399
mail (click) 876141 843876 345 7739 40 0% 0 0 207.014752
psych-load (click) 291580 251831 60 829 2 0% 0 0 23.326364
railsbench (click) 3357291 2778611 1592 19740 105 0% 0 0 566.583289
rubocop (click) 5792661 4977601 3001 57255 130 0% 6 0 1640.769713
ruby-lsp (click) 1050079 946671 408 7438 47 0% 1 0 198.444588
sequel (click) 510197 445735 11 119 0 0% 0 0 3.837301
shipit (click) 7046207 5883705 3125 49893 147 0% 0 0 1595.83998
addressable-equality (click) 324754 267498 44 1381 1 0% 0 0 32.982519
addressable-getters (click) 285330 251652 26 863 0 0% 0 0 20.030452
addressable-join (click) 290822 243853 24 941 0 0% 0 0 22.556021
addressable-merge (click) 289779 245444 27 896 0 0% 0 0 20.938224
addressable-new (click) 266639 229176 21 563 0 0% 0 0 13.600614
addressable-normalize (click) 321355 280787 43 1327 1 0% 0 0 31.677263
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 21.02857
addressable-setters (click) 265879 254392 20 582 0 0% 0 0 13.757441
addressable-to-s (click) 284938 266990 26 849 0 0% 0 0 19.856856
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.801518
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.653711
erubi (click) 251839 216726 6 134 0 0% 0 0 3.769497
etanni (click) 32989 26478 8 114 0 0% 0 0 3.396718
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.806583
fluentd (click) 516351 460562 7 116 0 0% 0 0 3.588178
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.424096
graphql (click) 418858 383211 74 1940 19 0% 0 0 52.809523
graphql-native (click) 362125 299651 39 532 0 0% 0 0 13.56489
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.71009
lee (click) 321987 273632 50 1102 0 0% 0 0 30.379971
matmul (click) 11103 4709 8 136 0 0% 0 0 4.099204
nbody (click) 14448 21176 6 251 0 0% 0 0 6.15351
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.244118
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.28568
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.958504
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 43.052586
rack (click) 289104 240940 35 581 0 0% 0 0 14.456462
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.680495
rubyboy (click) 708115 608473 154 6871 42 0% 0 0 162.631591
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.09994
splay (click) 34617 22483 9 175 0 0% 0 0 5.415061
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.695685
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.767373
tinygql (click) 305123 267690 59 1026 5 0% 0 0 26.176604
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1863.313587
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.176918
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.06958
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.485541
fib (click) 2659 2995 3 30 0 0% 0 0 1.107156
getivar (click) 3789 6778 3 79 0 0% 0 0 1.975012
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.344457
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.778091
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.867867
object-new (click) 2406 2818 2 36 0 0% 0 0 0.976676
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.295749
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.755526
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.144437
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.786901
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.816068
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.28288
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.74211
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.094899
setivar (click) 2783 3726 3 46 0 0% 0 0 1.273187
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.381059
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.706403
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.455266
structaref (click) 4407 9095 3 88 0 0% 0 0 2.318287
structaset (click) 4113 5834 3 70 0 0% 0 0 1.790985
throw (click) 5953 4624 5 53 0 0% 0 0 1.746117

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.