Ruby Benchmarks

Details for Benchmarks at 2026-05-04 01:12:08 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.1% faster than CRuby 4.1.0dev
  • 8.7% faster than YJIT 3.4.7
On railsbench it is
  • 114.7% faster than CRuby 4.1.0dev
  • 14.4% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 49 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 198 50 248
chunky-png 5 32 5 31 50 34 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 441 50 618 50 670
liquid-compile 5 417 5 483 50 583 50 744
liquid-render 5 173 5 172 50 437 50 464
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 199 50 253 50 289
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 154 50 247 50 249
ruby-lsp 5 156 5 165 50 222 50 237
sequel 5 420 5 451 50 580 50 627
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 166 50 182 50 195
addressable-join 5 74 5 79 50 64 50 73
addressable-merge 5 161 5 152 50 223 50 223
addressable-new 5 353 5 339 50 522 50 519
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 104 5 103 50 104 50 109
addressable-setters 5 186 5 176 50 231 50 231
addressable-to-s 5 164 5 166 50 182 50 194
binarytrees 5 81 5 86 50 136 50 169
blurhash 5 84 5 85 50 145 50 145
erubi 5 137 5 154 50 125 50 154
etanni 5 100 5 82 50 73 50 48
fannkuchredux 5 55 5 57 50 101 50 106
fluentd 5 62 5 59 50 21 50 30
gcbench 5 10 5 10 50 10 50 15
graphql 5 373 5 454 50 576 50 946
graphql-native 5 58 5 88 50 22 50 72
knucleotide 5 163 5 142 50 117 50 96
lee 5 23 5 30 50 10 50 14
matmul 5 53 5 57 50 88 50 96
nbody 5 250 5 283 50 663 50 631
nqueens 5 119 5 126 50 554 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 698 50 824
protoboeuf-encode 5 201 5 196 50 802 50 796
rack 5 447 5 456 50 709 50 740
ruby-json 5 84 5 108 50 50 50 84
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 11
splay 5 208 5 227 50 250 50 283
sudoku 5 48 5 49 50 155 50 157
tinygql 5 41 5 42 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 454 50 457
attr_accessor 5 157 5 168 50 1833 50 1863
cfunc_itself 5 347 5 321 50 1255 50 1259
fib 5 125 5 137 50 939 50 940
getivar 5 215 5 335 50 2306 50 2441
getivar-module 5 103 5 142 50 89 50 270
keyword_args 5 102 5 98 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 460 50 297 50 1516
object-new-initialize 5 168 5 256 50 259 50 1024
object-new-no-escape 5 80 5 121 50 89 50 516
respond_to 5 139 5 126 50 3902 50 3893
ruby-xor 5 247 5 231 50 1305 50 1309
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 106 50 310 50 291
send_rubyfunc_block 5 195 5 201 50 1372 50 1375
setivar 5 359 5 463 50 4930 50 5030
setivar_object 5 341 5 347 50 763 50 604
setivar_young 5 342 5 348 50 809 50 617
str_concat 5 399 5 456 50 1203 50 1167
structaref 5 153 5 177 50 1799 50 1855
structaset 5 198 5 212 50 369 50 476
throw 5 1109 5 1329 50 1441 50 1870

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) 1553690 1365997 202 2604 0 0% 0 0 72.29106
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.080965
erubi-rails (click) 1384877 1171630 268 3638 23 0% 0 0 95.359486
hexapdf (click) 1525445 1326904 593 15787 44 0% 0 0 428.027674
liquid-c (click) 566018 436042 114 2240 5 0% 0 0 58.927153
liquid-compile (click) 486440 451344 146 2733 2 0% 0 0 80.654725
liquid-render (click) 672279 633085 131 2963 8 0% 0 0 77.331222
lobsters (click) 8591931 7272981 3126 63873 122 0% 0 0 2039.111492
mail (click) 876352 850882 345 7738 40 0% 0 0 208.976097
psych-load (click) 292898 252665 61 833 2 0% 0 0 23.854381
railsbench (click) 3359831 2720421 1592 19749 104 0% 0 0 534.430131
rubocop (click) 5790090 4931319 3002 57192 127 0% 6 0 1639.768178
ruby-lsp (click) 1037153 937750 409 7472 47 0% 1 0 199.603806
sequel (click) 507569 483425 11 119 0 0% 0 0 4.134809
shipit (click) 7391365 6220911 3163 51747 155 0% 0 0 1667.122537
addressable-equality (click) 303317 242118 44 1389 1 0% 0 0 35.366569
addressable-getters (click) 282294 248492 26 869 0 0% 0 0 21.890955
addressable-join (click) 287506 240390 24 945 0 0% 0 0 24.451732
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 24.937937
addressable-new (click) 261572 231176 21 569 0 0% 0 0 14.527935
addressable-normalize (click) 316042 257969 43 1329 1 0% 0 0 33.334005
addressable-parse (click) 285005 258554 26 886 0 0% 0 0 24.593783
addressable-setters (click) 261237 200139 20 582 0 0% 0 0 15.003181
addressable-to-s (click) 281740 247235 26 853 0 0% 0 0 22.778967
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.735069
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.950549
erubi (click) 251950 200403 6 134 0 0% 0 0 3.892614
etanni (click) 32989 26478 8 114 0 0% 0 0 3.401789
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.832791
fluentd (click) 490802 413566 7 116 0 0% 0 0 3.626612
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.593278
graphql (click) 404777 357886 73 1931 19 0% 0 0 52.403773
graphql-native (click) 357308 309563 39 532 0 0% 0 0 13.775202
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.699877
lee (click) 321533 272751 49 1093 0 0% 0 0 30.345243
matmul (click) 11103 4709 8 136 0 0% 0 0 4.065521
nbody (click) 14448 21176 6 251 0 0% 0 0 6.169461
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.204207
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.519562
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.849588
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.28295
rack (click) 290256 267110 35 628 0 0% 0 0 17.189306
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.709844
rubyboy (click) 708018 624544 154 6873 42 0% 0 0 164.509032
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.330533
splay (click) 34953 22682 9 175 0 0% 0 0 5.34914
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.872059
tinygql (click) 304373 274325 59 1026 5 0% 0 0 26.441761
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.293457
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.369833
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.095345
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498882
fib (click) 2659 2995 3 30 0 0% 0 0 1.089608
getivar (click) 3789 6778 3 79 0 0% 0 0 1.919735
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.307051
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.821751
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.889123
object-new (click) 2406 2818 2 36 0 0% 0 0 0.974626
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.266101
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.989894
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.143728
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.844528
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.778103
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.265726
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.741726
setivar (click) 2783 3726 3 46 0 0% 0 0 1.21584
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.386322
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.68083
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.388998
structaref (click) 4407 9095 3 88 0 0% 0 0 2.338256
structaset (click) 4113 5834 3 70 0 0% 0 0 1.77349
throw (click) 5953 4624 5 53 0 0% 0 0 1.767839

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.