Ruby Benchmarks

Details for Benchmarks at 2026-07-27 01:00:03 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.7% faster than CRuby 4.1.0dev
  • 5.7% faster than YJIT 3.4.7
On railsbench it is
  • 111.0% faster than CRuby 4.1.0dev
  • 9.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 10 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 97 50 195 50 206
chunky-png 5 32 5 30 50 34 50 25
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 442 50 618 50 662
liquid-compile 5 419 5 515 50 581 50 830
liquid-il 5 67 5 68 50 117 50 125
liquid-render 5 173 5 171 50 412 50 464
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 50 254 50 290
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 247 50 238
ruby-lsp 5 153 5 158 50 238 50 224
sequel 5 428 5 459 50 589 50 663
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 165 5 173 50 183 50 208
addressable-join 5 74 5 83 50 66 50 81
addressable-merge 5 161 5 159 50 223 50 235
addressable-new 5 353 5 348 50 521 50 517
addressable-normalize 5 53 5 57 50 61 50 69
addressable-parse 5 104 5 107 50 103 50 115
addressable-setters 5 183 5 187 50 234 50 252
addressable-to-s 5 165 5 172 50 182 50 206
binarytrees 5 82 5 89 50 136 50 169
blurhash 5 84 5 83 50 145 50 145
erubi 5 139 5 151 50 130 50 161
etanni 5 101 5 82 50 72 50 50
fannkuchredux 5 55 5 57 50 101 50 105
fluentd 5 60 5 58 50 20 50 28
gcbench 5 10 5 10 50 10 50 10
graphql 5 368 5 464 50 533 50 899
graphql-native 5 57 5 86 50 23 50 58
knucleotide 5 163 5 151 50 117 50 104
lee 5 23 5 30 50 10 50 19
matmul 5 53 5 52 50 88 50 97
nbody 5 250 5 249 50 663 50 681
nqueens 5 119 5 125 50 554 50 600
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 697 50 678
protoboeuf-encode 5 201 5 202 50 800 50 804
rack 5 445 5 453 50 713 50 748
ruby-json 5 83 5 114 50 50 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
splay 5 209 5 205 50 250 50 235
string_malloc_pressure 5 146 5 34 50 101 50 10
sudoku 5 48 5 49 50 155 50 170
tinygql 5 42 5 44 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 446 50 455
attr_accessor 5 156 5 173 50 1815 50 1875
cfunc_itself 5 347 5 345 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 210 5 319 50 2306 50 2433
getivar-module 5 103 5 144 50 89 50 118
keyword_args 5 102 5 93 50 1239 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 477 50 298 50 1478
object-new-initialize 5 169 5 256 50 260 50 516
object-new-no-escape 5 80 5 141 50 89 50 364
respond_to 5 138 5 121 50 3897 50 3888
ruby-xor 5 247 5 241 50 1305 50 1298
send_bmethod 5 118 5 118 50 5539 50 4527
send_cfunc_block 5 107 5 103 50 305 50 285
send_rubyfunc_block 5 196 5 203 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 348 50 4930 50 4923
setivar_object 5 341 5 272 50 761 50 712
setivar_young 5 341 5 272 50 809 50 725
str_concat 5 390 5 441 50 1200 50 1067
structaref 5 153 5 192 50 1797 50 1883
structaset 5 198 5 239 50 369 50 494
throw 5 1110 5 1328 50 1444 50 1684

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) 1562925 1338861 204 2667 0 0% 0 0 73.832902
chunky-png (click) 312676 311864 79 1372 1 0% 0 0 38.754822
erubi-rails (click) 1381728 1199013 268 3630 23 0% 0 0 93.606084
hexapdf (click) 1524912 1314575 593 15681 45 0% 0 0 421.471007
liquid-c (click) 559051 451087 114 2226 5 0% 0 0 58.352484
liquid-compile (click) 468288 419418 146 2679 2 0% 0 0 72.436901
liquid-il (click) 614931 576557 70 2719 0 0% 0 0 79.119614
liquid-render (click) 664921 598641 131 2945 8 0% 0 0 76.96658
lobsters (click) 8522330 7104894 3126 63002 124 0% 0 0 2022.890676
mail (click) 860606 839656 345 7654 40 0% 0 0 205.593249
psych-load (click) 286757 283145 60 820 2 0% 0 0 22.893209
railsbench (click) 3357575 2938276 1591 19737 105 0% 0 0 535.079127
rubocop (click) 5764488 5082884 3000 57031 132 0% 6 0 1716.194608
ruby-lsp (click) 1046100 893147 408 7425 47 0% 1 0 195.822736
sequel (click) 520269 445565 11 119 0 0% 0 0 4.074019
shipit (click) 6875102 5874837 3135 49911 147 0% 0 0 1583.586438
addressable-equality (click) 323916 285201 44 1381 1 0% 0 0 33.215386
addressable-getters (click) 274472 232796 26 863 0 0% 0 0 19.875661
addressable-join (click) 286864 241434 24 941 0 0% 0 0 22.259723
addressable-merge (click) 289717 247463 27 896 0 0% 0 0 21.371686
addressable-new (click) 264553 220366 21 563 0 0% 0 0 13.579371
addressable-normalize (click) 319274 263790 43 1327 1 0% 0 0 31.745293
addressable-parse (click) 286911 246353 26 880 0 0% 0 0 20.930395
addressable-setters (click) 261921 235604 20 582 0 0% 0 0 13.618969
addressable-to-s (click) 283807 202477 26 849 0 0% 0 0 19.91224
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.775847
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.895097
erubi (click) 249978 217095 6 134 0 0% 0 0 3.844659
etanni (click) 33079 34728 8 114 0 0% 0 0 3.432313
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.794501
fluentd (click) 513951 460997 7 116 0 0% 0 0 3.586655
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.485212
graphql (click) 415550 382630 74 1939 18 0% 0 0 52.151485
graphql-native (click) 348906 295749 39 532 0 0% 0 0 13.86393
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.780979
lee (click) 319226 289261 50 1101 0 0% 0 0 30.256579
matmul (click) 11103 4709 8 136 0 0% 0 0 4.132365
nbody (click) 14448 21176 6 251 0 0% 0 0 6.125674
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.191274
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.555189
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 73.703856
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.246593
rack (click) 279646 247721 35 581 0 0% 0 0 14.539056
ruby-json (click) 19789 17789 8 206 0 0% 0 0 5.669542
rubyboy (click) 709630 610942 154 6871 42 0% 0 0 163.105301
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.391562
splay (click) 34682 14303 9 175 0 0% 0 0 5.296842
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.745302
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.926173
tinygql (click) 300217 272929 59 1024 5 0% 0 0 26.234608
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1870.410341
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 472.884036
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.075784
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.499063
fib (click) 2659 2995 3 30 0 0% 0 0 1.09601
getivar (click) 3789 6778 3 79 0 0% 0 0 1.922746
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.292119
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.777736
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.905754
object-new (click) 2406 2818 2 36 0 0% 0 0 0.997896
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.298893
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.723734
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.154152
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.77378
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.801554
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.299453
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.733652
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.060757
setivar (click) 2783 3726 3 46 0 0% 0 0 1.258738
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.389528
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.710968
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.496814
structaref (click) 4407 9095 3 88 0 0% 0 0 2.312868
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787038
throw (click) 5953 4624 5 53 0 0% 0 0 1.732715

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.