Ruby Benchmarks

Details for Benchmarks at 2026-07-13 00:57:56 UTC

YJIT metrics from the ruby-bench suite using Ruby 32a0375677.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.7% faster than CRuby 4.1.0dev
  • 10.1% faster than YJIT 3.4.7
On railsbench it is
  • 119.7% faster than CRuby 4.1.0dev
  • 18.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 14 minutes
aarch64 runtime: 7 hours, 59 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 95 50 201 50 238
chunky-png 5 32 5 31 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 421 5 446 50 626 50 679
liquid-compile 5 418 5 523 50 582 50 846
liquid-render 5 174 5 173 50 430 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 254 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 249 50 247
ruby-lsp 5 154 5 163 50 224 50 231
sequel 5 427 5 468 50 580 50 675
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 30 50 12 50 18
addressable-getters 5 165 5 175 50 183 50 210
addressable-join 5 75 5 85 50 66 50 82
addressable-merge 5 161 5 163 50 222 50 244
addressable-new 5 355 5 353 50 511 50 539
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 108 50 104 50 120
addressable-setters 5 184 5 189 50 233 50 255
addressable-to-s 5 164 5 173 50 182 50 209
binarytrees 5 82 5 87 50 136 50 163
blurhash 5 84 5 83 50 145 50 145
erubi 5 138 5 156 50 132 50 164
etanni 5 100 5 82 50 73 50 49
fannkuchredux 5 55 5 57 50 97 50 110
fluentd 5 62 5 62 50 20 50 28
gcbench 5 10 5 10 50 10 50 18
graphql 5 371 5 460 50 567 50 956
graphql-native 5 58 5 92 50 22 50 73
knucleotide 5 163 5 140 50 117 50 94
lee 5 23 5 29 50 10 50 17
matmul 5 53 5 54 50 88 50 97
nbody 5 247 5 246 50 663 50 632
nqueens 5 119 5 125 50 554 50 604
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 188 50 697 50 805
protoboeuf-encode 5 201 5 201 50 803 50 763
rack 5 441 5 475 50 701 50 797
ruby-json 5 84 5 114 50 51 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 209 50 250 50 250
string_malloc_pressure 5 145 5 35 50 103 50 10
sudoku 5 48 5 50 50 155 50 163
tinygql 5 41 5 44 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 457 50 455
attr_accessor 5 157 5 177 50 1833 50 1807
cfunc_itself 5 349 5 318 50 1255 50 1258
fib 5 124 5 135 50 939 50 939
getivar 5 210 5 269 50 2308 50 2442
getivar-module 5 103 5 140 50 89 50 267
keyword_args 5 103 5 98 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 474 50 298 50 1482
object-new-initialize 5 169 5 238 50 259 50 996
object-new-no-escape 5 81 5 132 50 89 50 529
respond_to 5 139 5 121 50 3901 50 3904
ruby-xor 5 247 5 236 50 1305 50 1312
send_bmethod 5 118 5 112 50 5539 50 4526
send_cfunc_block 5 106 5 103 50 306 50 306
send_rubyfunc_block 5 196 5 200 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 433 50 4930 50 5009
setivar_object 5 341 5 316 50 760 50 720
setivar_young 5 341 5 316 50 807 50 754
str_concat 5 391 5 440 50 1202 50 1057
structaref 5 153 5 174 50 1798 50 1861
structaset 5 198 5 222 50 370 50 482
throw 5 1108 5 1319 50 1439 50 1720

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) 1563429 1327059 204 2665 0 0% 0 0 74.844912
chunky-png (click) 306684 261169 79 1376 1 0% 0 0 38.29657
erubi-rails (click) 1381504 1258176 268 3626 23 0% 0 0 93.832312
hexapdf (click) 1533072 1336689 593 15748 44 0% 0 0 426.350277
liquid-c (click) 564957 525772 114 2240 5 0% 0 0 57.92408
liquid-compile (click) 479906 444718 146 2673 2 0% 0 0 73.335049
liquid-render (click) 671253 608108 131 2963 8 0% 0 0 77.298219
lobsters (click) 8568034 7283322 3126 63487 125 0% 0 0 2019.894927
mail (click) 877091 829128 345 7739 40 0% 0 0 208.490081
psych-load (click) 292535 237088 60 829 2 0% 0 0 23.527415
railsbench (click) 3357363 2910204 1592 19741 105 0% 0 0 533.874475
rubocop (click) 5796314 5006659 3001 57257 129 0% 6 0 1617.186838
ruby-lsp (click) 1051760 916001 408 7438 47 0% 1 0 202.004072
sequel (click) 508684 435892 11 119 0 0% 0 0 4.148571
shipit (click) 6869070 5892196 3136 50113 147 0% 0 0 1584.74558
addressable-equality (click) 307978 255588 44 1381 1 0% 0 0 33.095349
addressable-getters (click) 286285 253293 26 863 0 0% 0 0 20.209733
addressable-join (click) 289735 259617 24 941 0 0% 0 0 22.723421
addressable-merge (click) 273779 226008 27 896 0 0% 0 0 21.16883
addressable-new (click) 263647 217087 21 563 0 0% 0 0 13.290444
addressable-normalize (click) 318363 260506 43 1327 1 0% 0 0 31.411892
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 21.002996
addressable-setters (click) 263837 235747 20 582 0 0% 0 0 13.776334
addressable-to-s (click) 285888 260434 26 849 0 0% 0 0 19.999667
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.777623
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.852683
erubi (click) 250752 232470 6 134 0 0% 0 0 3.789296
etanni (click) 32989 26478 8 114 0 0% 0 0 3.406423
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.838643
fluentd (click) 513506 432000 7 116 0 0% 0 0 3.58318
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.426151
graphql (click) 418858 383211 74 1940 19 0% 0 0 53.010132
graphql-native (click) 343154 301433 39 532 0 0% 0 0 13.829127
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.690542
lee (click) 320900 338508 50 1102 0 0% 0 0 30.566353
matmul (click) 11103 4709 8 136 0 0% 0 0 4.095734
nbody (click) 14448 21176 6 251 0 0% 0 0 6.188869
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.153046
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.599061
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.601713
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 43.012992
rack (click) 286117 261604 35 581 0 0% 0 0 14.492643
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.682699
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 162.230657
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.210183
splay (click) 34617 22483 9 175 0 0% 0 0 5.466808
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.727446
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.86595
tinygql (click) 301350 263147 59 1026 5 0% 0 0 26.221274
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1856.194646
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.024543
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.093596
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.482884
fib (click) 2659 2995 3 30 0 0% 0 0 1.07194
getivar (click) 3789 6778 3 79 0 0% 0 0 1.916784
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.333287
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.794467
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.867974
object-new (click) 2406 2818 2 36 0 0% 0 0 0.957155
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.307258
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.731628
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.140956
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.754423
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.798651
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.309924
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.743465
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.049971
setivar (click) 2783 3726 3 46 0 0% 0 0 1.272956
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408856
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.688582
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.490611
structaref (click) 4407 9095 3 88 0 0% 0 0 2.360215
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787297
throw (click) 5953 4624 5 53 0 0% 0 0 1.751311

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.