Ruby Benchmarks

Details for Benchmarks at 2026-08-14 00:41:19 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.2% faster than CRuby 4.1.0dev
  • 7.6% faster than YJIT 3.4.7
On railsbench it is
  • 118.3% faster than CRuby 4.1.0dev
  • 17.8% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 6 minutes
aarch64 runtime: 7 hours, 47 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 200 50 194
chunky-png 5 32 5 33 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 441 50 615 50 671
liquid-compile 5 418 5 518 50 582 50 839
liquid-il 5 67 5 70 50 116 50 132
liquid-render 5 173 5 174 50 429 50 464
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 211 50 254 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 245 50 246
ruby-lsp 5 153 5 163 50 225 50 235
sequel 5 421 5 462 50 598 50 657
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 176 50 184 50 216
addressable-join 5 74 5 85 50 66 50 84
addressable-merge 5 161 5 165 50 222 50 251
addressable-new 5 351 5 362 50 516 50 558
addressable-normalize 5 52 5 58 50 60 50 72
addressable-parse 5 104 5 109 50 104 50 125
addressable-setters 5 184 5 193 50 233 50 264
addressable-to-s 5 164 5 175 50 183 50 212
binarytrees 5 82 5 93 50 136 50 143
blurhash 5 84 5 86 50 145 50 144
erubi 5 139 5 158 50 141 50 159
etanni 5 100 5 83 50 72 50 49
fannkuchredux 5 55 5 57 50 101 50 109
fluentd 5 63 5 66 50 21 50 30
gcbench 5 10 5 11 50 10 50 16
graphql 5 373 5 469 50 569 50 976
graphql-native 5 58 5 87 50 21 50 66
knucleotide 5 163 5 153 50 117 50 108
lee 5 23 5 33 50 10 50 19
matmul 5 53 5 51 50 88 50 97
nbody 5 248 5 253 50 663 50 685
nqueens 5 119 5 127 50 554 50 597
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 696 50 790
protoboeuf-encode 5 197 5 205 50 791 50 789
rack 5 442 5 489 50 709 50 787
ruby-json 5 84 5 116 50 51 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 218 50 250 50 249
string_malloc_pressure 5 146 5 33 50 104 50 10
sudoku 5 48 5 49 50 155 50 170
tinygql 5 41 5 44 50 40 50 55
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 450 50 456
attr_accessor 5 157 5 207 50 1834 50 1933
cfunc_itself 5 347 5 367 50 1255 50 1258
fib 5 125 5 146 50 939 50 939
getivar 5 211 5 317 50 2313 50 2428
getivar-module 5 103 5 141 50 89 50 125
keyword_args 5 102 5 108 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 483 50 294 50 1474
object-new-initialize 5 169 5 261 50 259 50 1015
object-new-no-escape 5 80 5 145 50 89 50 533
respond_to 5 139 5 125 50 3903 50 3901
ruby-xor 5 247 5 254 50 1305 50 1313
send_bmethod 5 113 5 122 50 5539 50 4527
send_cfunc_block 5 106 5 105 50 308 50 289
send_rubyfunc_block 5 196 5 206 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 298 50 298
setivar 5 359 5 349 50 4930 50 4923
setivar_object 5 341 5 286 50 766 50 711
setivar_young 5 341 5 286 50 811 50 732
str_concat 5 392 5 437 50 1195 50 937
structaref 5 153 5 208 50 1800 50 1908
structaset 5 198 5 272 50 370 50 489
throw 5 1109 5 1423 50 1443 50 1899

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) 1563315 1426296 204 2669 0 0% 0 0 78.848855
chunky-png (click) 323272 290724 79 1376 1 0% 0 0 38.476856
erubi-rails (click) 1380171 1218504 268 3626 23 0% 0 0 100.850016
hexapdf (click) 1528438 1300194 593 15742 45 0% 0 0 424.810961
liquid-c (click) 561082 507440 113 2224 5 0% 0 0 62.027178
liquid-compile (click) 477363 427775 146 2666 2 0% 0 0 73.592261
liquid-il (click) 613892 533936 70 2726 0 0% 0 0 80.556685
liquid-render (click) 665556 587432 130 2946 8 0% 0 0 77.186153
lobsters (click) 8529819 7137916 3127 63103 125 0% 0 0 2015.632727
mail (click) 870889 824415 345 7716 40 0% 0 0 207.366167
psych-load (click) 287975 233778 60 829 2 0% 0 0 23.131639
railsbench (click) 3353207 3053859 1591 19737 105 0% 0 0 536.196245
rubocop (click) 5762534 5014925 3000 57026 132 0% 6 0 1617.69974
ruby-lsp (click) 1049748 906813 408 7449 47 0% 1 0 199.51853
sequel (click) 522995 497181 11 119 0 0% 0 0 4.032727
shipit (click) 7233798 6114865 3183 51681 164 0% 0 0 1650.613982
addressable-equality (click) 323619 308759 44 1381 1 0% 0 0 33.592213
addressable-getters (click) 283902 251657 26 863 0 0% 0 0 20.116058
addressable-join (click) 289394 260242 24 941 0 0% 0 0 22.75845
addressable-merge (click) 289420 279184 27 896 0 0% 0 0 21.056188
addressable-new (click) 264251 243924 21 563 0 0% 0 0 13.376135
addressable-normalize (click) 318977 270964 43 1327 1 0% 0 0 31.801721
addressable-parse (click) 286614 261719 26 880 0 0% 0 0 20.843936
addressable-setters (click) 264451 238013 20 582 0 0% 0 0 13.816948
addressable-to-s (click) 283510 250611 26 849 0 0% 0 0 19.708895
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.780577
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.858282
erubi (click) 246877 204858 6 134 0 0% 0 0 3.868963
etanni (click) 30080 23270 8 114 0 0% 0 0 3.415286
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.841761
fluentd (click) 503644 413735 7 116 0 0% 0 0 3.580991
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.475552
graphql (click) 415076 380135 74 1940 18 0% 0 0 52.838744
graphql-native (click) 356360 310354 39 532 0 0% 0 0 13.665854
knucleotide (click) 9939 10477 7 110 0 0% 0 0 5.155517
lee (click) 319316 313221 50 1102 0 0% 0 0 30.493428
matmul (click) 11103 4709 8 136 0 0% 0 0 4.12903
nbody (click) 14448 21176 6 251 0 0% 0 0 6.157601
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.234215
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.29118
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 70.934499
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.202346
rack (click) 285482 287093 35 581 0 0% 0 0 14.710488
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.910846
rubyboy (click) 705222 598636 154 6875 42 0% 0 0 163.019943
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.296264
splay (click) 34617 22483 9 175 0 0% 0 0 5.397015
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.782115
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.899848
tinygql (click) 302454 265981 59 1026 5 0% 0 0 26.556031
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1873.660881
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.537774
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090824
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.481757
fib (click) 2659 2995 3 30 0 0% 0 0 1.105178
getivar (click) 3789 6778 3 79 0 0% 0 0 1.912994
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.297722
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823105
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.933927
object-new (click) 2406 2818 2 36 0 0% 0 0 1.008081
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.302613
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.768616
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.147544
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.819577
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.78022
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.302378
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.760052
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.068132
setivar (click) 2783 3726 3 46 0 0% 0 0 1.258934
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.40619
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.719928
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.388834
structaref (click) 4407 9095 3 88 0 0% 0 0 2.348585
structaset (click) 4113 5834 3 70 0 0% 0 0 1.776573
throw (click) 5953 4624 5 53 0 0% 0 0 1.77099

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.