Ruby Benchmarks

Details for Benchmarks at 2026-09-02 01:02:08 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.3% faster than CRuby 4.1.0dev
  • 8.1% faster than YJIT 3.4.7
On railsbench it is
  • 113.5% faster than CRuby 4.1.0dev
  • 14.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 15 minutes
aarch64 runtime: 7 hours, 54 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 91 5 95 50 201 50 226
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 449 50 619 50 683
liquid-compile 5 420 5 523 50 581 50 851
liquid-il 5 67 5 70 50 115 50 133
liquid-render 5 171 5 172 50 434 50 476
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 254 50 295
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 160 50 246 50 253
ruby-lsp 5 154 5 167 50 239 50 231
sequel 5 421 5 461 50 576 50 647
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 164 5 177 50 184 50 212
addressable-join 5 74 5 87 50 66 50 83
addressable-merge 5 162 5 165 50 221 50 246
addressable-new 5 352 5 353 50 516 50 548
addressable-normalize 5 52 5 58 50 59 50 72
addressable-parse 5 103 5 110 50 104 50 121
addressable-setters 5 185 5 196 50 230 50 258
addressable-to-s 5 164 5 176 50 182 50 211
binarytrees 5 81 5 90 50 136 50 170
blurhash 5 84 5 86 50 144 50 144
erubi 5 137 5 151 50 122 50 157
etanni 5 100 5 82 50 72 50 49
fannkuchredux 5 55 5 57 50 100 50 114
fluentd 5 56 5 64 50 20 50 38
gcbench 5 10 5 11 50 10 50 16
graphql 5 375 5 477 50 568 50 978
graphql-native 5 58 5 84 50 22 50 71
knucleotide 5 163 5 152 50 117 50 106
lee 5 23 5 34 50 10 50 21
matmul 5 53 5 55 50 87 50 99
nbody 5 250 5 277 50 662 50 689
nqueens 5 119 5 125 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 188 50 695 50 787
protoboeuf-encode 5 199 5 203 50 796 50 770
rack 5 445 5 456 50 711 50 737
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 208 5 224 50 250 50 277
string_malloc_pressure 5 146 5 32 50 101 50 10
sudoku 5 48 5 49 50 154 50 174
tinygql 5 42 5 46 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 451 50 458
30k_variables 5 20 5 22 50 10 50 10
attr_accessor 5 156 5 193 50 1827 50 1911
cfunc_itself 5 348 5 356 50 1253 50 1255
fib 5 124 5 136 50 939 50 939
getivar 5 210 5 335 50 2305 50 2431
getivar-module 5 103 5 147 50 88 50 122
keyword_args 5 102 5 107 50 1239 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 666 50 297 50 1580
object-new-initialize 5 169 5 272 50 259 50 1023
object-new-no-escape 5 80 5 151 50 89 50 543
respond_to 5 139 5 130 50 3900 50 3906
ruby-xor 5 247 5 252 50 1301 50 1295
send_bmethod 5 118 5 122 50 5529 50 4527
send_cfunc_block 5 106 5 110 50 304 50 282
send_rubyfunc_block 5 195 5 214 50 1368 50 1371
send_rubyfunc_inline 5 30 5 37 50 297 50 297
setivar 5 359 5 348 50 4929 50 4919
setivar_object 5 341 5 286 50 763 50 784
setivar_young 5 341 5 286 50 809 50 813
str_concat 5 391 5 405 50 1195 50 904
structaref 5 153 5 190 50 1796 50 1877
structaset 5 198 5 273 50 368 50 494
throw 5 1107 5 1436 50 1445 50 1894

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) 1555448 1391552 203 2610 0 0% 0 0 76.848945
chunky-png (click) 320885 256165 79 1378 1 0% 0 0 38.545365
erubi-rails (click) 1379555 1197666 268 3636 23 0% 0 0 94.228213
hexapdf (click) 1524917 1243608 593 15773 45 0% 0 0 425.746756
liquid-c (click) 557711 505272 113 2227 5 0% 0 0 62.743358
liquid-compile (click) 478011 397440 146 2677 2 0% 0 0 73.299806
liquid-il (click) 615199 511935 70 2738 0 0% 0 0 79.923223
liquid-render (click) 663985 563105 130 2949 8 0% 0 0 77.710147
lobsters (click) 8541647 7226888 3125 63518 124 0% 0 0 2025.816121
mail (click) 866813 822268 345 7750 40 0% 0 0 209.044543
psych-load (click) 287031 225835 60 836 2 0% 0 0 23.555382
railsbench (click) 3388543 2974298 1591 19815 105 0% 0 0 534.828119
rubocop (click) 5757613 4964881 3000 57127 132 0% 6 0 1612.793012
ruby-lsp (click) 1048836 966113 408 7486 47 0% 1 0 199.043504
sequel (click) 523736 466455 11 119 0 0% 0 0 4.301329
shipit (click) 7048236 5899503 3130 50397 147 0% 0 0 1594.26982
addressable-equality (click) 320877 281809 44 1382 1 0% 0 0 32.873291
addressable-getters (click) 284884 278232 26 863 0 0% 0 0 20.51647
addressable-join (click) 290042 278401 24 941 0 0% 0 0 22.943737
addressable-merge (click) 290128 289167 27 896 0 0% 0 0 21.766068
addressable-new (click) 261541 249742 21 564 0 0% 0 0 13.640978
addressable-normalize (click) 319653 305514 43 1328 1 0% 0 0 31.842611
addressable-parse (click) 287601 263723 26 880 0 0% 0 0 21.292181
addressable-setters (click) 261731 235623 20 582 0 0% 0 0 14.152153
addressable-to-s (click) 284492 268994 26 849 0 0% 0 0 20.352898
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.769993
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.884373
erubi (click) 242407 233362 6 135 0 0% 0 0 3.892971
etanni (click) 30080 23270 8 114 0 0% 0 0 3.422751
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.850448
fluentd (click) 513537 467848 7 116 0 0% 0 0 3.613243
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.47698
graphql (click) 415399 382238 74 1944 18 0% 0 0 52.663442
graphql-native (click) 355019 343123 39 532 0 0% 0 0 13.491161
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.862817
lee (click) 314497 276156 50 1107 0 0% 0 0 30.591641
matmul (click) 11076 4720 8 137 0 0% 0 0 4.151317
nbody (click) 14448 21176 6 251 0 0% 0 0 6.17217
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.222948
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.779574
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.746483
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.418258
rack (click) 285034 213811 35 581 0 0% 0 0 15.136825
ruby-json (click) 20081 18131 8 211 0 0% 0 0 5.951348
rubyboy (click) 669107 639969 154 6525 42 0% 0 0 163.310581
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.349733
splay (click) 34536 22516 9 175 0 0% 0 0 5.180966
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.736468
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.970449
tinygql (click) 298040 246135 59 1041 5 0% 0 0 26.465997
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1868.258555
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 473.825472
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4977.531694
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.044362
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.505166
fib (click) 2659 2995 3 30 0 0% 0 0 1.092432
getivar (click) 3789 6778 3 79 0 0% 0 0 1.91686
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.294278
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.808865
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.92457
object-new (click) 2352 2825 2 38 0 0% 0 0 1.000915
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.296726
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.764897
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.154033
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.805045
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.81948
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.309012
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.746442
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.050316
setivar (click) 2783 3726 3 46 0 0% 0 0 1.246275
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.394989
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.748374
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.404527
structaref (click) 4407 9095 3 88 0 0% 0 0 2.349637
structaset (click) 4113 5834 3 70 0 0% 0 0 1.809018
throw (click) 5953 4624 5 53 0 0% 0 0 1.770309

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.