Ruby Benchmarks

Details for Benchmarks at 2026-05-13 01:15:57 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.4% faster than CRuby 4.1.0dev
  • 8.0% faster than YJIT 3.4.7
On railsbench it is
  • 112.5% faster than CRuby 4.1.0dev
  • 13.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 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 91 5 90 50 201 50 237
chunky-png 5 32 5 31 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 438 50 625 50 660
liquid-compile 5 417 5 481 50 583 50 760
liquid-render 5 172 5 171 50 430 50 460
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 201 50 254 50 286
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 156 50 248 50 253
ruby-lsp 5 161 5 162 50 240 50 234
sequel 5 424 5 451 50 583 50 637
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 164 50 183 50 195
addressable-join 5 74 5 79 50 65 50 73
addressable-merge 5 160 5 151 50 222 50 219
addressable-new 5 356 5 335 50 520 50 508
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 104 5 102 50 103 50 109
addressable-setters 5 184 5 174 50 231 50 232
addressable-to-s 5 164 5 164 50 181 50 194
binarytrees 5 82 5 86 50 136 50 166
blurhash 5 84 5 84 50 145 50 145
erubi 5 132 5 149 50 138 50 155
etanni 5 100 5 80 50 73 50 47
fannkuchredux 5 55 5 57 50 100 50 104
fluentd 5 61 5 59 50 30 50 28
gcbench 5 10 5 10 50 10 50 16
graphql 5 371 5 454 50 571 50 934
graphql-native 5 58 5 89 50 22 50 71
knucleotide 5 163 5 142 50 118 50 96
lee 5 23 5 31 50 10 50 18
matmul 5 53 5 56 50 88 50 96
nbody 5 250 5 279 50 662 50 701
nqueens 5 119 5 121 50 555 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 178 50 697 50 803
protoboeuf-encode 5 200 5 194 50 804 50 835
rack 5 442 5 450 50 706 50 750
ruby-json 5 84 5 107 50 50 50 83
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 223 50 250 50 283
sudoku 5 48 5 50 50 155 50 155
tinygql 5 41 5 42 50 36 50 52
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 38 50 454 50 456
attr_accessor 5 157 5 173 50 1831 50 1879
cfunc_itself 5 348 5 308 50 1251 50 1259
fib 5 125 5 135 50 939 50 939
getivar 5 215 5 319 50 2315 50 2428
getivar-module 5 103 5 137 50 89 50 226
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 468 50 295 50 1494
object-new-initialize 5 169 5 232 50 258 50 1019
object-new-no-escape 5 80 5 138 50 89 50 516
respond_to 5 139 5 124 50 3902 50 3898
ruby-xor 5 247 5 224 50 1305 50 1294
send_bmethod 5 118 5 117 50 5539 50 4526
send_cfunc_block 5 106 5 105 50 305 50 293
send_rubyfunc_block 5 196 5 200 50 1372 50 1376
setivar 5 359 5 366 50 4931 50 4944
setivar_object 5 341 5 291 50 761 50 597
setivar_young 5 341 5 292 50 810 50 609
str_concat 5 391 5 456 50 1200 50 1157
structaref 5 153 5 175 50 1797 50 1847
structaset 5 198 5 229 50 370 50 482
throw 5 1108 5 1396 50 1441 50 1924

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) 1560536 1330695 203 2662 0 0% 0 0 74.359167
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.695602
erubi-rails (click) 1382661 1282806 268 3644 23 0% 0 0 93.661245
hexapdf (click) 1535058 1387294 593 15778 44 0% 0 0 429.032814
liquid-c (click) 566385 485658 114 2240 5 0% 0 0 58.908102
liquid-compile (click) 486855 451838 146 2733 2 0% 0 0 84.705263
liquid-render (click) 673043 585124 131 2963 8 0% 0 0 77.990857
lobsters (click) 8576149 7164077 3126 63700 122 0% 0 0 2044.284077
mail (click) 876774 875920 345 7738 40 0% 0 0 209.21454
psych-load (click) 292848 252617 61 833 2 0% 0 0 23.70022
railsbench (click) 3358624 2989263 1592 19756 104 0% 0 0 534.576184
rubocop (click) 5790437 5038726 3002 57196 127 0% 6 0 1637.770332
ruby-lsp (click) 1047322 900625 409 7472 47 0% 1 0 200.927149
sequel (click) 508543 410778 11 119 0 0% 0 0 3.739052
shipit (click) 7264904 6041950 3166 51629 154 0% 0 0 1669.361229
addressable-equality (click) 321431 272212 44 1380 1 0% 0 0 36.491535
addressable-getters (click) 278814 219820 26 863 0 0% 0 0 22.04677
addressable-join (click) 287506 240390 24 945 0 0% 0 0 26.916208
addressable-merge (click) 284545 239449 27 900 0 0% 0 0 23.268969
addressable-new (click) 262160 248525 21 565 0 0% 0 0 14.266659
addressable-normalize (click) 313889 263723 43 1327 1 0% 0 0 33.512108
addressable-parse (click) 282056 214048 26 886 0 0% 0 0 22.880229
addressable-setters (click) 243230 203253 20 582 0 0% 0 0 15.829789
addressable-to-s (click) 281376 246901 26 849 0 0% 0 0 22.612507
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.759592
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.994041
erubi (click) 249001 196857 6 134 0 0% 0 0 3.903304
etanni (click) 32989 26478 8 114 0 0% 0 0 3.443479
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.935881
fluentd (click) 488861 443845 7 116 0 0% 0 0 3.649175
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.576934
graphql (click) 415285 370301 73 1931 19 0% 0 0 52.572357
graphql-native (click) 358645 303134 39 532 0 0% 0 0 13.786053
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.711945
lee (click) 321482 305491 49 1093 0 0% 0 0 30.577538
matmul (click) 11103 4709 8 136 0 0% 0 0 4.11948
nbody (click) 14448 21176 6 251 0 0% 0 0 6.199126
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.217783
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 109.125267
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.131027
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.338156
rack (click) 287262 271780 35 628 0 0% 0 0 16.717581
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.70623
rubyboy (click) 705921 630376 154 6871 42 0% 0 0 164.615877
rubykon (click) 147788 154811 138 2094 4 0% 0 0 55.259839
splay (click) 34953 22682 9 175 0 0% 0 0 5.183627
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.858701
tinygql (click) 301424 287143 59 1026 5 0% 0 0 26.310671
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1862.830514
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.928318
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.06024
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.565981
fib (click) 2659 2995 3 30 0 0% 0 0 1.144211
getivar (click) 3789 6778 3 79 0 0% 0 0 1.988077
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.454423
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.857166
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.919441
object-new (click) 2406 2818 2 36 0 0% 0 0 0.992037
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.258845
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.972211
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.10405
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.813744
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.804969
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.231177
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.738093
setivar (click) 2783 3726 3 46 0 0% 0 0 1.280541
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.416575
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.718543
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.520026
structaref (click) 4407 9095 3 88 0 0% 0 0 2.319226
structaset (click) 4113 5834 3 70 0 0% 0 0 1.80861
throw (click) 5953 4624 5 53 0 0% 0 0 1.778809

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.