Ruby Benchmarks

Details for Benchmarks at 2026-03-31 00:57:40 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.2% faster than CRuby 4.1.0dev
  • 3.6% faster than YJIT 3.4.7
On railsbench it is
  • 107.5% faster than CRuby 4.1.0dev
  • 9.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 59 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 91 5 96 50 205 50 237
chunky-png 5 32 5 29 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 427 50 624 50 627
liquid-compile 5 417 5 472 50 582 50 676
liquid-render 5 172 5 172 50 431 50 353
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 191 50 254 50 289
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 247 50 256
ruby-lsp 5 154 5 163 50 224 50 235
sequel 5 428 5 433 50 581 50 596
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 166 5 163 50 183 50 199
addressable-join 5 74 5 78 50 63 50 71
addressable-merge 5 160 5 149 50 222 50 220
addressable-new 5 349 5 332 50 520 50 518
addressable-normalize 5 53 5 54 50 60 50 57
addressable-parse 5 104 5 101 50 104 50 110
addressable-setters 5 184 5 171 50 232 50 226
addressable-to-s 5 164 5 164 50 182 50 197
binarytrees 5 82 5 84 50 136 50 160
blurhash 5 84 5 81 50 145 50 144
erubi 5 141 5 140 50 138 50 138
etanni 5 101 5 77 50 73 50 44
fannkuchredux 5 55 5 57 50 101 50 105
fluentd 5 60 5 62 50 20 50 25
gcbench 5 10 5 10 50 10 50 16
graphql 5 356 5 447 50 573 50 948
graphql-native 5 59 5 87 50 21 50 71
knucleotide 5 163 5 142 50 117 50 96
lee 5 23 5 30 50 10 50 13
matmul 5 53 5 54 50 87 50 96
nbody 5 250 5 271 50 662 50 705
nqueens 5 119 5 120 50 554 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 697 50 822
protoboeuf-encode 5 200 5 197 50 799 50 826
rack 5 442 5 429 50 712 50 589
ruby-json 5 84 5 105 50 50 50 82
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 221 50 250 50 274
sudoku 5 48 5 49 50 155 50 160
tinygql 5 42 5 41 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 459 50 450
attr_accessor 5 156 5 179 50 1834 50 1887
cfunc_itself 5 346 5 321 50 1255 50 1259
fib 5 125 5 133 50 939 50 938
getivar 5 216 5 282 50 2305 50 2397
getivar-module 5 103 5 117 50 87 50 254
keyword_args 5 102 5 99 50 1240 50 1242
loops-times 5 23 5 24 50 63 50 62
object-new 5 268 5 473 50 295 50 1492
object-new-initialize 5 169 5 254 50 258 50 951
object-new-no-escape 5 79 5 138 50 89 50 506
respond_to 5 139 5 129 50 3903 50 3903
ruby-xor 5 247 5 231 50 1306 50 1297
send_bmethod 5 118 5 117 50 5538 50 4519
send_cfunc_block 5 105 5 106 50 354 50 370
send_rubyfunc_block 5 243 5 262 50 6916 50 6915
setivar 5 359 5 472 50 4930 50 5038
setivar_object 5 341 5 339 50 763 50 604
setivar_young 5 342 5 339 50 808 50 616
str_concat 5 391 5 435 50 1206 50 1173
structaref 5 153 5 179 50 1798 50 1863
structaset 5 198 5 233 50 368 50 483
throw 5 1107 5 1373 50 1442 50 1880

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) 1550997 1355101 203 2645 0 0% 0 0 74.872583
chunky-png (click) 323755 322037 79 1384 1 0% 0 0 38.766241
erubi-rails (click) 1339163 1227772 248 3271 6 0% 0 0 85.487645
hexapdf (click) 1509115 1343629 593 15441 44 0% 0 0 427.044877
liquid-c (click) 544182 485365 114 2236 5 0% 0 0 59.565178
liquid-compile (click) 459528 412376 146 2619 2 0% 0 0 76.101224
liquid-render (click) 638579 551350 132 2622 6 0% 0 0 70.032133
lobsters (click) 8311985 7054879 3115 60455 119 0% 0 0 1970.595446
mail (click) 871025 869693 345 7728 40 0% 0 0 209.469688
psych-load (click) 280584 230094 61 808 2 0% 0 0 22.747766
railsbench (click) 3313544 2852543 1592 19186 97 0% 0 0 522.440091
rubocop (click) 5765765 4855244 3003 56911 126 0% 6 0 1630.935837
ruby-lsp (click) 1042529 935801 408 7436 46 0% 1 0 203.876715
sequel (click) 500321 434814 11 94 0 0% 0 0 3.08478
shipit (click) 6820527 5639317 3130 49208 142 0% 0 0 1583.679365
addressable-equality (click) 314369 264945 44 1323 1 0% 0 0 31.550724
addressable-getters (click) 284723 242974 26 991 0 0% 0 0 23.645871
addressable-join (click) 285171 260692 24 929 0 0% 0 0 23.063022
addressable-merge (click) 285657 265439 27 900 0 0% 0 0 22.475389
addressable-new (click) 264580 242642 21 637 0 0% 0 0 15.570816
addressable-normalize (click) 295018 225250 43 1289 1 0% 0 0 31.130578
addressable-parse (click) 281096 237584 26 898 0 0% 0 0 22.18879
addressable-setters (click) 260877 232639 20 588 0 0% 0 0 14.506089
addressable-to-s (click) 281533 238806 26 853 0 0% 0 0 21.245378
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.8089
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.888782
erubi (click) 251900 200356 6 134 0 0% 0 0 3.877758
etanni (click) 32731 34499 8 114 0 0% 0 0 3.428357
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.856012
fluentd (click) 492240 407515 7 116 0 0% 0 0 3.821213
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.505652
graphql (click) 414332 328489 73 1917 19 0% 0 0 53.212149
graphql-native (click) 358010 327073 39 532 0 0% 0 0 13.676089
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.759253
lee (click) 320662 295877 49 1085 0 0% 0 0 30.629409
matmul (click) 11103 4709 8 136 0 0% 0 0 4.172936
nbody (click) 14448 21176 6 251 0 0% 0 0 6.096552
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.237422
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.605591
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.575533
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.480271
rack (click) 280029 284242 35 486 0 0% 0 0 12.370296
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.788293
rubyboy (click) 709026 642517 154 6871 42 0% 0 0 164.139154
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.474987
splay (click) 23803 16994 9 74 0 0% 0 0 2.664289
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.942633
tinygql (click) 287078 252898 59 1037 5 0% 0 0 26.807269
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.944225
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.287631
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.111289
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.512934
fib (click) 2659 2995 3 30 0 0% 0 0 1.097351
getivar (click) 3789 6778 3 79 0 0% 0 0 1.952019
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.330335
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.799458
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.933591
object-new (click) 2406 2818 2 36 0 0% 0 0 1.028841
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.269439
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.062305
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.148347
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.832745
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.78834
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.78423
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.4727
setivar (click) 2783 3726 3 46 0 0% 0 0 1.242723
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.398675
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.74653
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.426154
structaref (click) 4407 9095 3 88 0 0% 0 0 2.327041
structaset (click) 4113 5834 3 70 0 0% 0 0 1.780478
throw (click) 5410 4014 5 44 0 0% 0 0 1.531647

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.