Ruby Benchmarks

Details for Benchmarks at 2026-08-27 02:02:21 UTC

YJIT metrics from the ruby-bench suite using Ruby 5ee95de080.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.4% faster than CRuby 4.1.0dev
  • 8.1% faster than YJIT 3.4.7
On railsbench it is
  • 109.9% faster than CRuby 4.1.0dev
  • 12.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 43 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 94 5 95 50 206 50 219
chunky-png 5 32 5 32 50 34 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 451 50 625 50 682
liquid-compile 5 421 5 527 50 580 50 855
liquid-il 5 67 5 70 50 117 50 134
liquid-render 5 170 5 175 50 434 50 466
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 213 50 255 50 297
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 248
ruby-lsp 5 164 5 166 50 229 50 227
sequel 5 424 5 460 50 582 50 654
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 166 5 177 50 184 50 214
addressable-join 5 74 5 86 50 66 50 85
addressable-merge 5 161 5 164 50 222 50 245
addressable-new 5 352 5 359 50 517 50 544
addressable-normalize 5 52 5 58 50 60 50 73
addressable-parse 5 104 5 110 50 104 50 122
addressable-setters 5 183 5 194 50 233 50 259
addressable-to-s 5 164 5 176 50 182 50 212
binarytrees 5 82 5 92 50 136 50 172
blurhash 5 83 5 87 50 145 50 145
erubi 5 135 5 148 50 136 50 152
etanni 5 100 5 79 50 73 50 46
fannkuchredux 5 55 5 56 50 101 50 111
fluentd 5 61 5 73 50 20 50 33
gcbench 5 10 5 10 50 10 50 17
graphql 5 370 5 486 50 532 50 1002
graphql-native 5 57 5 88 50 21 50 69
knucleotide 5 164 5 149 50 117 50 104
lee 5 23 5 32 50 10 50 20
matmul 5 53 5 55 50 88 50 100
nbody 5 248 5 283 50 663 50 680
nqueens 5 119 5 126 50 554 50 595
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 191 50 696 50 784
protoboeuf-encode 5 197 5 205 50 794 50 837
rack 5 435 5 459 50 720 50 753
ruby-json 5 84 5 114 50 51 50 89
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 225 50 250 50 278
string_malloc_pressure 5 146 5 32 50 103 50 10
sudoku 5 48 5 49 50 155 50 173
tinygql 5 41 5 45 50 36 50 57
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 454 50 455
attr_accessor 5 157 5 192 50 1833 50 1910
cfunc_itself 5 347 5 358 50 1255 50 1258
fib 5 125 5 143 50 939 50 939
getivar 5 214 5 339 50 2306 50 2442
getivar-module 5 103 5 147 50 89 50 126
keyword_args 5 102 5 106 50 1240 50 1242
loops-times 5 23 5 27 50 63 50 62
object-new 5 268 5 487 50 296 50 1533
object-new-initialize 5 169 5 259 50 259 50 1017
object-new-no-escape 5 81 5 144 50 89 50 540
respond_to 5 139 5 132 50 3904 50 3895
ruby-xor 5 247 5 248 50 1306 50 1301
send_bmethod 5 118 5 122 50 5539 50 4527
send_cfunc_block 5 107 5 108 50 306 50 289
send_rubyfunc_block 5 196 5 208 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 298
setivar 5 359 5 349 50 4930 50 4923
setivar_object 5 341 5 287 50 765 50 780
setivar_young 5 342 5 285 50 809 50 818
str_concat 5 391 5 425 50 1194 50 935
structaref 5 153 5 195 50 1799 50 1882
structaset 5 198 5 262 50 370 50 490
throw 5 1110 5 1435 50 1445 50 1901

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) 1563419 1385859 204 2665 0 0% 0 0 78.558561
chunky-png (click) 322048 264194 79 1376 1 0% 0 0 38.277815
erubi-rails (click) 1381144 1186816 268 3626 23 0% 0 0 99.559787
hexapdf (click) 1528317 1308278 593 15741 45 0% 0 0 425.424126
liquid-c (click) 543292 510211 113 2224 5 0% 0 0 58.238826
liquid-compile (click) 460145 414631 146 2666 2 0% 0 0 74.390131
liquid-il (click) 612750 540646 70 2722 0 0% 0 0 79.41228
liquid-render (click) 666698 645873 130 2946 8 0% 0 0 77.274567
lobsters (click) 8543495 7227925 3126 63266 125 0% 0 0 2025.118339
mail (click) 870918 799821 345 7716 40 0% 0 0 208.317396
psych-load (click) 288009 266584 60 829 2 0% 0 0 23.409528
railsbench (click) 3352800 2987632 1591 19743 105 0% 0 0 540.667752
rubocop (click) 5762424 5030465 3000 57003 133 0% 6 0 1616.442173
ruby-lsp (click) 1048837 880698 408 7449 47 0% 1 0 200.837251
sequel (click) 522477 455142 11 119 0 0% 0 0 4.534695
shipit (click) 6900654 5898025 3137 50446 147 0% 0 0 1617.965054
addressable-equality (click) 323192 258494 44 1381 1 0% 0 0 33.36512
addressable-getters (click) 266401 238338 26 863 0 0% 0 0 20.015229
addressable-join (click) 288967 226361 24 941 0 0% 0 0 22.380183
addressable-merge (click) 288998 220727 27 896 0 0% 0 0 20.992898
addressable-new (click) 264794 211679 21 563 0 0% 0 0 13.632278
addressable-normalize (click) 301471 241256 43 1327 1 0% 0 0 31.336972
addressable-parse (click) 285894 276674 26 880 0 0% 0 0 20.888868
addressable-setters (click) 264019 220511 20 582 0 0% 0 0 13.842287
addressable-to-s (click) 284048 234750 26 849 0 0% 0 0 20.09109
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.765461
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.895632
erubi (click) 245643 194727 6 134 0 0% 0 0 3.846002
etanni (click) 29494 22579 8 114 0 0% 0 0 3.440167
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.900937
fluentd (click) 513293 416983 7 116 0 0% 0 0 3.630071
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.438267
graphql (click) 412703 385072 74 1940 18 0% 0 0 53.002548
graphql-native (click) 358745 321535 39 532 0 0% 0 0 13.580618
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.76293
lee (click) 319350 313239 50 1102 0 0% 0 0 30.433572
matmul (click) 11103 4709 8 136 0 0% 0 0 4.13184
nbody (click) 14448 21176 6 251 0 0% 0 0 6.077912
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.185843
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.059047
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.690416
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.564918
rack (click) 284253 260574 35 581 0 0% 0 0 15.323459
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.91365
rubyboy (click) 669105 645703 154 6524 42 0% 0 0 162.902451
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.626587
splay (click) 34617 22483 9 175 0 0% 0 0 5.118271
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.747601
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.722543
tinygql (click) 302490 274171 59 1026 5 0% 0 0 26.47643
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1874.296055
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.276182
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.100204
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.495864
fib (click) 2659 2995 3 30 0 0% 0 0 1.115123
getivar (click) 3789 6778 3 79 0 0% 0 0 1.931288
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.308503
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.808835
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.905969
object-new (click) 2406 2818 2 36 0 0% 0 0 0.997008
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.294897
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.769214
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.154189
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.823071
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.804464
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.314252
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.750907
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.049152
setivar (click) 2783 3726 3 46 0 0% 0 0 1.25627
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.418813
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.706898
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.407097
structaref (click) 4407 9095 3 88 0 0% 0 0 2.334586
structaset (click) 4113 5834 3 70 0 0% 0 0 1.752915
throw (click) 5953 4624 5 53 0 0% 0 0 1.779984

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.