Ruby Benchmarks

Details for Benchmarks at 2026-07-24 00:52:41 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.3% faster than CRuby 4.1.0dev
  • 5.5% faster than YJIT 3.4.7
On railsbench it is
  • 109.4% faster than CRuby 4.1.0dev
  • 10.7% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 10 minutes
aarch64 runtime: 7 hours, 52 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 194 50 203
chunky-png 5 31 5 30 50 33 50 24
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 438 50 621 50 665
liquid-compile 5 406 5 510 50 545 50 831
liquid-il 5 66 5 68 50 116 50 125
liquid-render 5 171 5 171 50 430 50 463
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 207 50 254 50 287
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 246 50 238
ruby-lsp 5 157 5 159 50 224 50 222
sequel 5 427 5 458 50 597 50 659
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 11 50 17
addressable-getters 5 165 5 171 50 183 50 205
addressable-join 5 75 5 83 50 66 50 79
addressable-merge 5 161 5 158 50 225 50 230
addressable-new 5 351 5 342 50 519 50 508
addressable-normalize 5 53 5 56 50 61 50 69
addressable-parse 5 104 5 106 50 104 50 116
addressable-setters 5 185 5 185 50 233 50 251
addressable-to-s 5 163 5 170 50 183 50 203
binarytrees 5 81 5 88 50 136 50 168
blurhash 5 84 5 84 50 145 50 144
erubi 5 139 5 151 50 137 50 161
etanni 5 100 5 82 50 72 50 50
fannkuchredux 5 55 5 57 50 100 50 109
fluentd 5 58 5 61 50 29 50 30
gcbench 5 10 5 10 50 10 50 10
graphql 5 366 5 465 50 572 50 903
graphql-native 5 58 5 87 50 21 50 61
knucleotide 5 163 5 150 50 116 50 103
lee 5 23 5 30 50 10 50 19
matmul 5 53 5 52 50 87 50 96
nbody 5 250 5 249 50 663 50 630
nqueens 5 119 5 126 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 179 50 697 50 694
protoboeuf-encode 5 200 5 202 50 803 50 805
rack 5 446 5 451 50 716 50 748
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 206 50 250 50 238
string_malloc_pressure 5 146 5 35 50 101 50 10
sudoku 5 48 5 49 50 155 50 164
tinygql 5 42 5 43 50 34 50 50
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 454 50 452
attr_accessor 5 156 5 177 50 1832 50 1880
cfunc_itself 5 348 5 323 50 1254 50 1250
fib 5 125 5 132 50 939 50 939
getivar 5 215 5 321 50 2299 50 2431
getivar-module 5 103 5 141 50 88 50 117
keyword_args 5 97 5 92 50 1239 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 478 50 298 50 1481
object-new-initialize 5 169 5 252 50 259 50 515
object-new-no-escape 5 80 5 139 50 89 50 363
respond_to 5 139 5 121 50 3899 50 3899
ruby-xor 5 247 5 233 50 1304 50 1302
send_bmethod 5 118 5 115 50 5539 50 4525
send_cfunc_block 5 106 5 102 50 305 50 284
send_rubyfunc_block 5 196 5 203 50 1371 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 347 50 4930 50 4918
setivar_object 5 341 5 272 50 759 50 716
setivar_young 5 341 5 272 50 810 50 727
str_concat 5 390 5 435 50 1199 50 1067
structaref 5 153 5 182 50 1798 50 1863
structaset 5 199 5 223 50 370 50 487
throw 5 1110 5 1323 50 1441 50 1704

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) 1559834 1416254 204 2669 0 0% 0 0 74.641208
chunky-png (click) 322696 266514 79 1372 1 0% 0 0 38.058131
erubi-rails (click) 1379816 1203994 268 3630 23 0% 0 0 94.109839
hexapdf (click) 1521365 1318376 593 15682 45 0% 0 0 429.46953
liquid-c (click) 555893 487918 114 2226 5 0% 0 0 58.221695
liquid-compile (click) 478304 431392 146 2679 2 0% 0 0 72.874088
liquid-il (click) 611558 515017 70 2718 0 0% 0 0 79.785391
liquid-render (click) 668022 602311 131 2945 8 0% 0 0 77.505907
lobsters (click) 8514928 7200608 3127 62892 125 0% 0 0 2020.904868
mail (click) 865148 803886 345 7654 40 0% 0 0 205.15738
psych-load (click) 286757 283145 60 820 2 0% 0 0 23.029177
railsbench (click) 3356414 2920338 1591 19736 105 0% 0 0 534.450012
rubocop (click) 5765057 4952611 3000 57020 132 0% 6 0 1616.239558
ruby-lsp (click) 1046100 942299 408 7425 47 0% 1 0 196.549248
sequel (click) 522141 471967 11 119 0 0% 0 0 3.93095
shipit (click) 6878282 5807651 3135 49983 147 0% 0 0 1606.142559
addressable-equality (click) 321056 281393 44 1381 1 0% 0 0 33.010181
addressable-getters (click) 284199 236291 26 863 0 0% 0 0 20.306588
addressable-join (click) 285405 256204 24 941 0 0% 0 0 22.98085
addressable-merge (click) 286852 243650 27 896 0 0% 0 0 21.092132
addressable-new (click) 264553 228558 21 563 0 0% 0 0 13.48792
addressable-normalize (click) 319274 263790 43 1327 1 0% 0 0 31.798722
addressable-parse (click) 282970 241563 26 880 0 0% 0 0 20.821109
addressable-setters (click) 264748 222647 20 582 0 0% 0 0 14.153338
addressable-to-s (click) 282857 225417 26 849 0 0% 0 0 19.915591
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.7516
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.938813
erubi (click) 246330 229000 6 134 0 0% 0 0 3.888769
etanni (click) 33079 34728 8 114 0 0% 0 0 3.440723
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.822247
fluentd (click) 513001 459289 7 116 0 0% 0 0 3.66617
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.534693
graphql (click) 415484 374400 74 1939 18 0% 0 0 52.540231
graphql-native (click) 355685 303519 39 532 0 0% 0 0 13.508644
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.783461
lee (click) 315011 235066 50 1101 0 0% 0 0 30.458709
matmul (click) 11103 4709 8 136 0 0% 0 0 4.146008
nbody (click) 14448 21176 6 251 0 0% 0 0 6.106838
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.271179
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 107.676669
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.227282
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.547296
rack (click) 282569 251090 35 581 0 0% 0 0 14.657889
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.73595
rubyboy (click) 706477 623202 154 6871 42 0% 0 0 163.424951
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.557233
splay (click) 34682 14303 9 175 0 0% 0 0 5.302749
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.793875
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.897865
tinygql (click) 299262 279480 59 1024 5 0% 0 0 26.421266
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1874.016742
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 475.747799
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.067628
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.553771
fib (click) 2659 2995 3 30 0 0% 0 0 1.111293
getivar (click) 3789 6778 3 79 0 0% 0 0 1.93863
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.323775
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.79693
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.946888
object-new (click) 2406 2818 2 36 0 0% 0 0 1.024528
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.290566
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.720999
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.187507
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.788189
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.792767
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.290566
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.76944
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.073418
setivar (click) 2783 3726 3 46 0 0% 0 0 1.26124
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.416337
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.722631
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.478775
structaref (click) 4407 9095 3 88 0 0% 0 0 2.342363
structaset (click) 4113 5834 3 70 0 0% 0 0 1.783933
throw (click) 5953 4624 5 53 0 0% 0 0 1.764559

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.