Ruby Benchmarks

Details for Benchmarks at 2026-05-23 01:16:01 UTC

YJIT metrics from the ruby-bench suite using Ruby 5855d61ee4.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.9% faster than CRuby 4.1.0dev
  • 12.0% faster than YJIT 3.4.7
On railsbench it is
  • 121.9% faster than CRuby 4.1.0dev
  • 19.6% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 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 95 50 196 50 239
chunky-png 5 31 5 31 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 441 50 615 50 681
liquid-compile 5 418 5 518 50 581 50 865
liquid-render 5 170 5 172 50 435 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 210 50 254 50 314
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 157 50 246 50 258
ruby-lsp 5 158 5 159 50 216 50 229
sequel 5 425 5 463 50 594 50 643
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 172 50 183 50 214
addressable-join 5 74 5 84 50 66 50 85
addressable-merge 5 162 5 160 50 223 50 249
addressable-new 5 350 5 345 50 522 50 552
addressable-normalize 5 52 5 58 50 60 50 72
addressable-parse 5 104 5 108 50 103 50 123
addressable-setters 5 184 5 188 50 234 50 265
addressable-to-s 5 164 5 172 50 181 50 214
binarytrees 5 82 5 81 50 136 50 148
blurhash 5 84 5 83 50 145 50 145
erubi 5 138 5 146 50 138 50 143
etanni 5 100 5 78 50 72 50 46
fannkuchredux 5 55 5 57 50 100 50 106
fluentd 5 58 5 60 50 21 50 28
gcbench 5 10 5 10 50 10 50 18
graphql 5 372 5 456 50 571 50 973
graphql-native 5 57 5 92 50 21 50 70
knucleotide 5 163 5 142 50 117 50 95
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 51 50 88 50 99
nbody 5 250 5 238 50 663 50 704
nqueens 5 119 5 117 50 554 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 184 50 697 50 806
protoboeuf-encode 5 201 5 203 50 801 50 825
rack 5 444 5 466 50 697 50 809
ruby-json 5 84 5 113 50 50 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 12
splay 5 209 5 225 50 250 50 282
sudoku 5 48 5 49 50 155 50 169
tinygql 5 41 5 43 50 40 50 56
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 38 5 39 50 454 50 448
attr_accessor 5 157 5 176 50 1832 50 1885
cfunc_itself 5 346 5 318 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 211 5 301 50 2314 50 2413
getivar-module 5 103 5 133 50 89 50 281
keyword_args 5 102 5 101 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 476 50 297 50 1501
object-new-initialize 5 169 5 233 50 260 50 1027
object-new-no-escape 5 81 5 138 50 89 50 514
respond_to 5 139 5 119 50 3901 50 3901
ruby-xor 5 246 5 234 50 1305 50 1296
send_bmethod 5 118 5 117 50 5539 50 4526
send_cfunc_block 5 107 5 100 50 306 50 262
send_rubyfunc_block 5 196 5 195 50 1372 50 1375
setivar 5 359 5 369 50 4930 50 4943
setivar_object 5 341 5 294 50 762 50 646
setivar_young 5 342 5 294 50 809 50 680
str_concat 5 391 5 452 50 1201 50 1134
structaref 5 153 5 167 50 1802 50 1835
structaset 5 198 5 213 50 370 50 481
throw 5 1108 5 1306 50 1442 50 1783

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) 1562915 1341488 203 2678 0 0% 0 0 79.0357
chunky-png (click) 324128 297572 79 1376 1 0% 0 0 37.994621
erubi-rails (click) 1393858 1206094 268 3669 23 0% 0 0 101.039531
hexapdf (click) 1515867 1266218 593 15776 44 0% 0 0 429.264247
liquid-c (click) 567038 486324 114 2245 5 0% 0 0 59.228873
liquid-compile (click) 485510 408714 146 2749 2 0% 0 0 78.475151
liquid-render (click) 672111 566618 131 2963 8 0% 0 0 77.477252
lobsters (click) 8588829 7154772 3125 63665 125 0% 0 0 2031.270216
mail (click) 875617 833330 345 7738 40 0% 0 0 208.689995
psych-load (click) 291878 251119 61 833 2 0% 0 0 23.756
railsbench (click) 3364558 2817786 1592 19763 105 0% 0 0 536.373685
rubocop (click) 5804549 5145217 3002 57346 127 0% 6 0 1621.245946
ruby-lsp (click) 1052612 915531 409 7472 47 0% 1 0 198.246131
sequel (click) 510181 444899 11 119 0 0% 0 0 4.244168
shipit (click) 6892799 5936989 3134 50315 147 0% 0 0 1593.830629
addressable-equality (click) 325500 317529 44 1380 1 0% 0 0 33.353605
addressable-getters (click) 285832 260491 26 863 0 0% 0 0 20.441407
addressable-join (click) 289963 234244 24 941 0 0% 0 0 23.260571
addressable-merge (click) 291237 263350 27 896 0 0% 0 0 21.455857
addressable-new (click) 266593 253211 21 569 0 0% 0 0 13.896583
addressable-normalize (click) 320907 312566 43 1327 1 0% 0 0 31.54729
addressable-parse (click) 285264 233537 26 880 0 0% 0 0 20.927671
addressable-setters (click) 266263 230371 20 582 0 0% 0 0 14.210057
addressable-to-s (click) 285440 234869 26 849 0 0% 0 0 20.179842
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.732216
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.755112
erubi (click) 250985 231673 6 134 0 0% 0 0 3.777689
etanni (click) 32989 26478 8 114 0 0% 0 0 3.389522
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.815578
fluentd (click) 491805 455160 7 116 0 0% 0 0 3.631436
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.314279
graphql (click) 416477 362833 73 1931 19 0% 0 0 52.286129
graphql-native (click) 361075 313982 39 532 0 0% 0 0 13.610833
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.659093
lee (click) 320805 287925 49 1093 0 0% 0 0 29.986064
matmul (click) 11103 4709 8 136 0 0% 0 0 4.078113
nbody (click) 14448 21176 6 251 0 0% 0 0 6.10803
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.23863
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.125705
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.074585
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.861623
rack (click) 290479 251132 35 628 0 0% 0 0 15.717898
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.769452
rubyboy (click) 707843 632173 154 6873 42 0% 0 0 161.512469
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.595531
splay (click) 34953 22682 9 175 0 0% 0 0 5.335636
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.797376
tinygql (click) 304646 274779 59 1026 5 0% 0 0 26.526304
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.569925
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.631372
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.098672
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.506879
fib (click) 2659 2995 3 30 0 0% 0 0 1.078988
getivar (click) 3789 6778 3 79 0 0% 0 0 1.909305
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.317779
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.802425
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92839
object-new (click) 2406 2818 2 36 0 0% 0 0 1.001202
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.266541
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.904213
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.243157
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.775191
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.77298
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.284783
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.711558
setivar (click) 2783 3726 3 46 0 0% 0 0 1.25088
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.389846
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.71746
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.444745
structaref (click) 4407 9095 3 88 0 0% 0 0 2.352593
structaset (click) 4113 5834 3 70 0 0% 0 0 1.779677
throw (click) 5953 4624 5 53 0 0% 0 0 1.789847

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.