Ruby Benchmarks

Details for Benchmarks at 2026-03-24 00:48:46 UTC

YJIT metrics from the ruby-bench suite using Ruby 216c5eb335.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.6% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 116.3% faster than CRuby 4.1.0dev
  • 13.6% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 minutes
aarch64 runtime: 7 hours, 51 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 92 5 99 50 200 50 247
chunky-png 5 32 5 33 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 426 5 438 50 630 50 640
liquid-compile 5 421 5 483 50 581 50 736
liquid-render 5 171 5 177 50 425 50 446
lobsters 5 19 5 20 50 10 50 10
mail 5 194 5 197 50 254 50 279
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 162 50 247 50 257
ruby-lsp 5 158 5 163 50 239 50 235
sequel 5 427 5 439 50 595 50 610
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 12 50 13
addressable-getters 5 165 5 172 50 183 50 201
addressable-join 5 74 5 80 50 65 50 75
addressable-merge 5 161 5 161 50 222 50 227
addressable-new 5 352 5 360 50 520 50 538
addressable-normalize 5 52 5 56 50 60 50 62
addressable-parse 5 104 5 106 50 104 50 113
addressable-setters 5 186 5 187 50 234 50 247
addressable-to-s 5 165 5 171 50 182 50 199
binarytrees 5 82 5 89 50 136 50 159
blurhash 5 84 5 85 50 145 50 145
erubi 5 139 5 152 50 137 50 161
etanni 5 100 5 75 50 73 50 41
fannkuchredux 5 55 5 57 50 101 50 107
fluentd 5 56 5 64 50 20 50 25
gcbench 5 10 5 10 50 10 50 10
graphql 5 367 5 455 50 575 50 964
graphql-native 5 57 5 89 50 21 50 71
knucleotide 5 164 5 153 50 117 50 107
lee 5 22 5 31 50 10 50 11
matmul 5 53 5 52 50 88 50 88
nbody 5 250 5 258 50 663 50 701
nqueens 5 119 5 128 50 554 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 188 50 698 50 813
protoboeuf-encode 5 201 5 212 50 796 50 804
rack 5 440 5 449 50 714 50 739
ruby-json 5 84 5 104 50 50 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 236 50 250 50 291
sudoku 5 48 5 49 50 155 50 159
tinygql 5 42 5 42 50 34 50 50
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 41 50 455 50 459
attr_accessor 5 156 5 209 50 1832 50 1937
cfunc_itself 5 348 5 355 50 1255 50 1259
fib 5 125 5 147 50 939 50 939
getivar 5 215 5 354 50 2314 50 2451
getivar-module 5 103 5 145 50 88 50 251
keyword_args 5 102 5 110 50 1240 50 1243
loops-times 5 23 5 27 50 63 50 63
object-new 5 267 5 409 50 297 50 915
object-new-initialize 5 168 5 243 50 259 50 775
object-new-no-escape 5 81 5 131 50 89 50 375
respond_to 5 138 5 139 50 3898 50 3898
ruby-xor 5 247 5 250 50 1305 50 1297
send_bmethod 5 118 5 127 50 5539 50 4527
send_cfunc_block 5 103 5 107 50 354 50 371
send_rubyfunc_block 5 243 5 247 50 6922 50 6924
setivar 5 359 5 480 50 4930 50 5042
setivar_object 5 341 5 303 50 765 50 589
setivar_young 5 343 5 306 50 809 50 617
str_concat 5 391 5 466 50 1201 50 1204
structaref 5 153 5 192 50 1799 50 1881
structaset 5 198 5 259 50 370 50 486
throw 5 1107 5 1416 50 1444 50 1816

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) 1547426 1327416 203 2661 0 0% 0 0 73.710628
chunky-png (click) 322103 279079 79 1376 1 0% 0 0 38.219359
erubi-rails (click) 1378297 1131555 268 3689 22 0% 0 0 95.990852
hexapdf (click) 1526817 1313239 593 15710 44 0% 0 0 421.640658
liquid-c (click) 559595 438542 114 2236 5 0% 0 0 57.773168
liquid-compile (click) 482315 432163 146 2708 2 0% 0 0 76.586246
liquid-render (click) 666936 570840 131 2959 8 0% 0 0 77.005178
lobsters (click) 8700637 7217257 3127 64127 120 0% 0 0 2055.386921
mail (click) 873627 848533 345 7728 40 0% 0 0 206.891385
psych-load (click) 287738 239031 61 831 2 0% 0 0 23.339774
railsbench (click) 3349925 2831344 1592 19735 97 0% 0 0 538.737191
rubocop (click) 5784905 4893249 3002 57134 125 0% 6 0 1611.714486
ruby-lsp (click) 1043227 937169 409 7464 47 0% 1 0 198.999847
sequel (click) 505313 431999 11 119 0 0% 0 0 3.855091
shipit (click) 7131419 6072134 3123 50502 143 0% 0 0 1645.035416
addressable-equality (click) 320440 263054 44 1380 1 0% 0 0 33.110892
addressable-getters (click) 276731 217764 26 863 0 0% 0 0 20.226327
addressable-join (click) 282060 218036 24 941 0 0% 0 0 22.872784
addressable-merge (click) 284901 232169 27 898 0 0% 0 0 21.951363
addressable-new (click) 258782 236233 21 565 0 0% 0 0 13.920219
addressable-normalize (click) 314410 272982 43 1327 1 0% 0 0 31.486836
addressable-parse (click) 282856 240140 26 894 0 0% 0 0 21.563029
addressable-setters (click) 260253 207048 20 582 0 0% 0 0 14.152163
addressable-to-s (click) 278948 228058 26 849 0 0% 0 0 20.242118
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.804382
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.740251
erubi (click) 247357 211824 6 134 0 0% 0 0 3.861716
etanni (click) 32731 34499 8 114 0 0% 0 0 3.372502
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.793343
fluentd (click) 488519 419188 7 116 0 0% 0 0 3.663756
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.359798
graphql (click) 410105 372742 73 1909 18 0% 0 0 52.274404
graphql-native (click) 354012 273549 39 532 0 0% 0 0 13.776891
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.694604
lee (click) 319064 253138 49 1102 0 0% 0 0 30.500917
matmul (click) 11103 4709 8 136 0 0% 0 0 4.12956
nbody (click) 14448 21176 6 251 0 0% 0 0 6.057577
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.221063
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.277679
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.141525
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.111139
rack (click) 285583 269269 35 581 0 0% 0 0 14.86057
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.726736
rubyboy (click) 706976 640502 154 6871 42 0% 0 0 164.003775
rubykon (click) 149667 148880 138 2117 4 0% 0 0 55.467158
splay (click) 34953 22682 9 175 0 0% 0 0 5.178895
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.641791
tinygql (click) 300113 269675 59 1031 5 0% 0 0 26.41926
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.664657
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 471.170229
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.07083
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.505102
fib (click) 2659 2995 3 30 0 0% 0 0 1.08007
getivar (click) 3789 6778 3 79 0 0% 0 0 1.919681
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.323714
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.77393
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.925699
object-new (click) 2406 2818 2 36 0 0% 0 0 1.092301
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.321868
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.974019
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.134451
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.802063
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.792909
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.800966
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.429836
setivar (click) 2783 3726 3 46 0 0% 0 0 1.257874
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.405273
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.733999
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.375952
structaref (click) 4407 9095 3 88 0 0% 0 0 2.354582
structaset (click) 4113 5834 3 70 0 0% 0 0 1.793145
throw (click) 5953 4624 5 53 0 0% 0 0 1.799046

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.