Ruby Benchmarks

Details for Benchmarks at 2026-08-10 00:36:57 UTC

YJIT metrics from the ruby-bench suite using Ruby 8233b22228.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.3% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 118.0% faster than CRuby 4.1.0dev
  • 13.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 6 minutes
aarch64 runtime: 7 hours, 48 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 96 50 196 50 210
chunky-png 5 32 5 32 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 443 50 619 50 659
liquid-compile 5 418 5 520 50 577 50 845
liquid-il 5 65 5 70 50 117 50 123
liquid-render 5 172 5 177 50 432 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 253 50 294
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 249 50 249
ruby-lsp 5 153 5 163 50 222 50 221
sequel 5 429 5 459 50 587 50 658
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 176 50 183 50 210
addressable-join 5 75 5 86 50 65 50 82
addressable-merge 5 160 5 165 50 222 50 235
addressable-new 5 351 5 360 50 519 50 526
addressable-normalize 5 52 5 59 50 60 50 69
addressable-parse 5 104 5 110 50 104 50 117
addressable-setters 5 184 5 196 50 234 50 252
addressable-to-s 5 164 5 176 50 183 50 207
binarytrees 5 82 5 85 50 136 50 164
blurhash 5 84 5 85 50 145 50 145
erubi 5 137 5 157 50 122 50 157
etanni 5 101 5 82 50 73 50 47
fannkuchredux 5 55 5 56 50 99 50 112
fluentd 5 62 5 65 50 20 50 39
gcbench 5 10 5 11 50 10 50 10
graphql 5 372 5 487 50 570 50 888
graphql-native 5 59 5 87 50 22 50 61
knucleotide 5 163 5 154 50 118 50 108
lee 5 23 5 33 50 10 50 20
matmul 5 53 5 55 50 88 50 99
nbody 5 250 5 280 50 661 50 687
nqueens 5 119 5 128 50 554 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 189 50 696 50 660
protoboeuf-encode 5 201 5 204 50 794 50 808
rack 5 439 5 476 50 717 50 790
ruby-json 5 83 5 115 50 51 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 208 5 210 50 247 50 245
string_malloc_pressure 5 145 5 36 50 102 50 10
sudoku 5 48 5 49 50 155 50 174
tinygql 5 41 5 44 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 40 50 455 50 457
attr_accessor 5 157 5 207 50 1832 50 1936
cfunc_itself 5 348 5 354 50 1255 50 1258
fib 5 125 5 144 50 939 50 939
getivar 5 210 5 331 50 2308 50 2437
getivar-module 5 103 5 127 50 89 50 125
keyword_args 5 102 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 482 50 298 50 1490
object-new-initialize 5 169 5 261 50 259 50 528
object-new-no-escape 5 81 5 146 50 89 50 366
respond_to 5 137 5 134 50 3910 50 3906
ruby-xor 5 247 5 228 50 1305 50 1311
send_bmethod 5 118 5 121 50 5539 50 4527
send_cfunc_block 5 107 5 110 50 305 50 284
send_rubyfunc_block 5 196 5 217 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 297
setivar 5 359 5 348 50 4929 50 4923
setivar_object 5 343 5 285 50 765 50 714
setivar_young 5 341 5 285 50 809 50 703
str_concat 5 391 5 438 50 1196 50 990
structaref 5 153 5 205 50 1800 50 1903
structaset 5 199 5 267 50 364 50 489
throw 5 1110 5 1272 50 1445 50 1691

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) 1561081 1337762 204 2662 0 0% 0 0 73.092735
chunky-png (click) 322711 266514 79 1372 1 0% 0 0 37.669139
erubi-rails (click) 1382094 1191255 268 3630 23 0% 0 0 100.265764
hexapdf (click) 1524927 1322767 593 15681 45 0% 0 0 422.538612
liquid-c (click) 557025 489409 114 2226 5 0% 0 0 61.393704
liquid-compile (click) 478319 439584 146 2679 2 0% 0 0 71.878843
liquid-il (click) 613537 541906 70 2718 0 0% 0 0 79.606117
liquid-render (click) 665996 575117 131 2945 8 0% 0 0 76.662808
lobsters (click) 8521314 7185834 3127 63004 125 0% 0 0 1995.701687
mail (click) 864853 819934 345 7654 40 0% 0 0 205.001968
psych-load (click) 286772 283145 60 820 2 0% 0 0 22.634242
railsbench (click) 3358329 2840503 1591 19740 105 0% 0 0 532.021291
rubocop (click) 5764286 4992041 3000 57024 133 0% 6 0 1607.975845
ruby-lsp (click) 1044200 956473 408 7425 47 0% 1 0 196.334621
sequel (click) 523106 449039 11 119 0 0% 0 0 4.173168
shipit (click) 6867727 5911016 3136 50079 147 0% 0 0 1586.23825
addressable-equality (click) 321899 258095 44 1381 1 0% 0 0 32.762792
addressable-getters (click) 280551 231817 26 863 0 0% 0 0 19.750314
addressable-join (click) 289706 228492 24 941 0 0% 0 0 22.62049
addressable-merge (click) 289732 247463 27 896 0 0% 0 0 21.146473
addressable-new (click) 263310 218414 21 563 0 0% 0 0 13.409555
addressable-normalize (click) 318031 270030 43 1327 1 0% 0 0 31.228718
addressable-parse (click) 284894 235631 26 880 0 0% 0 0 20.592946
addressable-setters (click) 263500 220690 20 582 0 0% 0 0 13.769574
addressable-to-s (click) 282564 249677 26 849 0 0% 0 0 19.70657
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.736713
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.953884
erubi (click) 248735 231527 6 134 0 0% 0 0 3.877466
etanni (click) 33079 34728 8 114 0 0% 0 0 3.436814
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.773396
fluentd (click) 513966 452873 7 116 0 0% 0 0 3.601626
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.449338
graphql (click) 414307 388870 74 1939 18 0% 0 0 51.956831
graphql-native (click) 357390 321888 39 532 0 0% 0 0 13.340125
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.690067
lee (click) 319241 289261 50 1101 0 0% 0 0 30.328639
matmul (click) 11103 4709 8 136 0 0% 0 0 4.105194
nbody (click) 14448 21176 6 251 0 0% 0 0 6.175999
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.210617
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.824954
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 73.412337
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.289227
rack (click) 284181 228402 35 581 0 0% 0 0 14.46283
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.727746
rubyboy (click) 709705 594666 154 6875 42 0% 0 0 162.179069
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.228612
splay (click) 34682 14303 9 175 0 0% 0 0 5.334138
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.953954
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.883746
tinygql (click) 302142 266929 59 1024 5 0% 0 0 26.026639
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1861.182261
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 472.958142
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.072874
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.472177
fib (click) 2659 2995 3 30 0 0% 0 0 1.091875
getivar (click) 3789 6778 3 79 0 0% 0 0 1.92043
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.344048
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.781719
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.896823
object-new (click) 2406 2818 2 36 0 0% 0 0 1.007133
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.319081
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.738207
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.138868
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.791524
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.756557
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.296524
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.756496
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.075277
setivar (click) 2783 3726 3 46 0 0% 0 0 1.259392
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.409133
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.724953
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.487068
structaref (click) 4407 9095 3 88 0 0% 0 0 2.302676
structaset (click) 4113 5834 3 70 0 0% 0 0 1.767207
throw (click) 5953 4624 5 53 0 0% 0 0 1.716792

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.