Ruby Benchmarks

Details for Benchmarks at 2026-04-17 01:04:26 UTC

YJIT metrics from the ruby-bench suite using Ruby 9c682d3d56.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.7% faster than CRuby 4.1.0dev
  • 8.2% faster than YJIT 3.4.7
On railsbench it is
  • 115.8% faster than CRuby 4.1.0dev
  • 15.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 49 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 95 50 203 50 244
chunky-png 5 32 5 31 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 421 5 439 50 626 50 660
liquid-compile 5 417 5 486 50 580 50 760
liquid-render 5 170 5 169 50 433 50 461
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 199 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 154 5 154 50 246 50 254
ruby-lsp 5 163 5 161 50 238 50 236
sequel 5 420 5 454 50 583 50 634
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 167 50 184 50 196
addressable-join 5 75 5 78 50 66 50 72
addressable-merge 5 161 5 151 50 223 50 219
addressable-new 5 353 5 338 50 520 50 522
addressable-normalize 5 53 5 53 50 59 50 59
addressable-parse 5 104 5 103 50 105 50 109
addressable-setters 5 186 5 175 50 233 50 233
addressable-to-s 5 164 5 167 50 182 50 194
binarytrees 5 82 5 85 50 136 50 143
blurhash 5 84 5 83 50 145 50 145
erubi 5 132 5 152 50 125 50 157
etanni 5 100 5 81 50 72 50 46
fannkuchredux 5 55 5 56 50 101 50 103
fluentd 5 58 5 61 50 22 50 29
gcbench 5 10 5 10 50 10 50 15
graphql 5 373 5 450 50 571 50 938
graphql-native 5 57 5 87 50 22 50 70
knucleotide 5 164 5 146 50 118 50 99
lee 5 22 5 29 50 10 50 15
matmul 5 53 5 56 50 88 50 94
nbody 5 250 5 281 50 661 50 705
nqueens 5 119 5 119 50 554 50 580
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 177 50 697 50 785
protoboeuf-encode 5 201 5 191 50 804 50 816
rack 5 444 5 448 50 712 50 719
ruby-json 5 84 5 105 50 50 50 81
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 224 50 250 50 284
sudoku 5 48 5 49 50 155 50 159
tinygql 5 41 5 42 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 456 50 455
attr_accessor 5 157 5 179 50 1833 50 1884
cfunc_itself 5 348 5 324 50 1255 50 1259
fib 5 125 5 134 50 939 50 939
getivar 5 211 5 303 50 2309 50 2413
getivar-module 5 103 5 135 50 88 50 268
keyword_args 5 102 5 102 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 471 50 297 50 1515
object-new-initialize 5 169 5 253 50 259 50 1021
object-new-no-escape 5 80 5 133 50 89 50 513
respond_to 5 139 5 131 50 3903 50 3898
ruby-xor 5 247 5 233 50 1305 50 1310
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 107 5 107 50 306 50 276
send_rubyfunc_block 5 196 5 210 50 1371 50 1376
setivar 5 360 5 473 50 4930 50 5040
setivar_object 5 341 5 349 50 765 50 672
setivar_young 5 341 5 350 50 808 50 688
str_concat 5 391 5 446 50 1200 50 1171
structaref 5 153 5 188 50 1798 50 1875
structaset 5 198 5 204 50 367 50 469
throw 5 1109 5 1391 50 1442 50 1780

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) 1561701 1315635 203 2657 0 0% 0 0 73.308943
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.128729
erubi-rails (click) 1379865 1287978 268 3626 23 0% 0 0 99.485509
hexapdf (click) 1534927 1272495 593 15780 44 0% 0 0 429.233541
liquid-c (click) 566018 460658 114 2240 5 0% 0 0 59.326874
liquid-compile (click) 489068 454412 146 2771 2 0% 0 0 83.973609
liquid-render (click) 672279 633085 131 2963 8 0% 0 0 77.116015
lobsters (click) 8591298 7315742 3125 63848 122 0% 0 0 2035.177274
mail (click) 876352 850882 345 7738 40 0% 0 0 208.214114
psych-load (click) 292898 260857 61 833 2 0% 0 0 23.841264
railsbench (click) 3356774 2806199 1592 19740 104 0% 0 0 533.176539
rubocop (click) 5788048 5026535 3002 57173 127 0% 6 0 1636.395426
ruby-lsp (click) 1045165 930637 409 7472 47 0% 1 0 198.762816
sequel (click) 506202 448857 11 121 0 0% 0 0 3.82087
shipit (click) 7106156 5956727 3124 50363 147 0% 0 0 1590.721276
addressable-equality (click) 317043 242495 44 1380 1 0% 0 0 34.794725
addressable-getters (click) 282294 248492 26 869 0 0% 0 0 21.713597
addressable-join (click) 287506 240390 24 945 0 0% 0 0 28.785012
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 25.126815
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.37612
addressable-normalize (click) 317593 268242 43 1343 1 0% 0 0 34.087213
addressable-parse (click) 266041 219409 26 886 0 0% 0 0 22.828152
addressable-setters (click) 262355 250801 20 584 0 0% 0 0 16.221205
addressable-to-s (click) 281735 247235 26 853 0 0% 0 0 21.195464
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.723865
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.89516
erubi (click) 251950 200403 6 134 0 0% 0 0 3.886929
etanni (click) 32989 26478 8 114 0 0% 0 0 3.41824
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.756607
fluentd (click) 490802 405342 7 116 0 0% 0 0 3.553234
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.765137
graphql (click) 413082 351122 73 1931 19 0% 0 0 52.341223
graphql-native (click) 358270 335438 39 532 0 0% 0 0 13.66348
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.615926
lee (click) 321778 272972 49 1099 0 0% 0 0 30.262443
matmul (click) 11103 4709 8 136 0 0% 0 0 4.095552
nbody (click) 14448 21176 6 251 0 0% 0 0 6.162929
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.176988
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.863938
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.849462
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.075092
rack (click) 285927 277102 35 581 0 0% 0 0 15.679337
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.747056
rubyboy (click) 708976 666783 154 6873 42 0% 0 0 162.997696
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.039667
splay (click) 34953 22682 9 175 0 0% 0 0 5.147846
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.893358
tinygql (click) 304902 274818 59 1032 5 0% 0 0 26.672996
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1852.534391
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.225647
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.077082
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.523667
fib (click) 2659 2995 3 30 0 0% 0 0 1.100906
getivar (click) 3789 6778 3 79 0 0% 0 0 1.929243
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.297045
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.796836
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.923838
object-new (click) 2406 2818 2 36 0 0% 0 0 0.991864
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.254993
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.962448
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.143242
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.766684
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.815394
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.299641
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.745882
setivar (click) 2783 3726 3 46 0 0% 0 0 1.246321
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.370276
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.707163
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.423219
structaref (click) 4407 9095 3 88 0 0% 0 0 2.309961
structaset (click) 4113 5834 3 70 0 0% 0 0 1.758559
throw (click) 5953 4624 5 53 0 0% 0 0 1.764728

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.