Ruby Benchmarks

Details for Benchmarks at 2026-07-06 01:06:57 UTC

YJIT metrics from the ruby-bench suite using Ruby 6e53ba7309.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.5% faster than CRuby 4.1.0dev
  • 9.2% faster than YJIT 3.4.7
On railsbench it is
  • 117.3% faster than CRuby 4.1.0dev
  • 16.8% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 51 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 93 5 96 50 204 50 215
chunky-png 5 32 5 30 50 34 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 439 50 621 50 670
liquid-compile 5 417 5 513 50 581 50 832
liquid-render 5 173 5 174 50 434 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 204 50 254 50 298
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 247 50 247
ruby-lsp 5 154 5 163 50 238 50 234
sequel 5 428 5 466 50 587 50 666
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 17
addressable-getters 5 165 5 170 50 183 50 206
addressable-join 5 75 5 83 50 66 50 81
addressable-merge 5 162 5 161 50 223 50 229
addressable-new 5 354 5 346 50 522 50 530
addressable-normalize 5 53 5 58 50 60 50 70
addressable-parse 5 104 5 106 50 104 50 117
addressable-setters 5 185 5 185 50 234 50 250
addressable-to-s 5 164 5 170 50 182 50 205
binarytrees 5 81 5 86 50 136 50 141
blurhash 5 84 5 84 50 145 50 145
erubi 5 135 5 147 50 138 50 153
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 60 5 59 50 21 50 28
gcbench 5 10 5 10 50 10 50 18
graphql 5 373 5 469 50 569 50 963
graphql-native 5 58 5 90 50 22 50 70
knucleotide 5 163 5 144 50 117 50 96
lee 5 23 5 30 50 10 50 17
matmul 5 53 5 53 50 88 50 95
nbody 5 250 5 250 50 663 50 678
nqueens 5 119 5 130 50 554 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 184 50 698 50 779
protoboeuf-encode 5 199 5 200 50 805 50 799
rack 5 440 5 468 50 717 50 794
ruby-json 5 84 5 111 50 51 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 207 50 250 50 243
sudoku 5 48 5 49 50 155 50 157
tinygql 5 41 5 44 50 39 50 54
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 454 50 459
attr_accessor 5 156 5 174 50 1815 50 1877
cfunc_itself 5 348 5 311 50 1255 50 1258
fib 5 125 5 139 50 939 50 939
getivar 5 210 5 336 50 2305 50 2439
getivar-module 5 103 5 137 50 89 50 277
keyword_args 5 102 5 107 50 1240 50 1245
loops-times 5 23 5 25 50 63 50 61
object-new 5 267 5 475 50 298 50 1473
object-new-initialize 5 169 5 273 50 260 50 982
object-new-no-escape 5 80 5 143 50 89 50 513
respond_to 5 139 5 121 50 3896 50 3899
ruby-xor 5 247 5 240 50 1305 50 1308
send_bmethod 5 118 5 111 50 5538 50 4526
send_cfunc_block 5 107 5 103 50 305 50 291
send_rubyfunc_block 5 192 5 198 50 1371 50 1375
setivar 5 359 5 433 50 4931 50 5008
setivar_object 5 341 5 308 50 762 50 600
setivar_young 5 342 5 308 50 809 50 612
str_concat 5 391 5 427 50 1200 50 1045
structaref 5 153 5 179 50 1799 50 1860
structaset 5 199 5 210 50 369 50 482
throw 5 1110 5 1312 50 1442 50 1703

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) 1565090 1345796 204 2664 0 0% 0 0 73.895806
chunky-png (click) 323899 298349 79 1376 1 0% 0 0 37.772041
erubi-rails (click) 1387272 1257939 268 3626 23 0% 0 0 93.875681
hexapdf (click) 1535244 1290336 593 15767 44 0% 0 0 431.586671
liquid-c (click) 568228 488917 114 2240 5 0% 0 0 59.605533
liquid-compile (click) 483177 465267 146 2673 2 0% 0 0 72.960759
liquid-render (click) 672553 593651 131 2963 8 0% 0 0 77.78421
lobsters (click) 8538651 7099636 3124 63315 122 0% 0 0 2013.9886
mail (click) 875054 867792 345 7739 40 0% 0 0 208.466671
psych-load (click) 290493 251191 60 829 2 0% 0 0 23.313971
railsbench (click) 3359285 3034914 1592 19741 105 0% 0 0 537.893694
rubocop (click) 5806365 4994055 3001 57361 129 0% 6 0 1628.078855
ruby-lsp (click) 1054126 910672 409 7470 47 0% 1 0 199.875788
sequel (click) 511960 440043 11 119 0 0% 0 0 4.339943
shipit (click) 6906321 5972180 3134 50184 147 0% 0 0 1600.459641
addressable-equality (click) 326002 285819 44 1381 1 0% 0 0 33.294299
addressable-getters (click) 286001 261272 26 863 0 0% 0 0 20.248308
addressable-join (click) 291779 237302 24 941 0 0% 0 0 23.019014
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.141782
addressable-new (click) 266639 229176 21 563 0 0% 0 0 13.559462
addressable-normalize (click) 319318 253935 43 1327 1 0% 0 0 31.722098
addressable-parse (click) 285998 259775 26 880 0 0% 0 0 20.768075
addressable-setters (click) 264792 212812 20 582 0 0% 0 0 13.871585
addressable-to-s (click) 283851 225390 26 849 0 0% 0 0 19.967236
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.762801
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.783214
erubi (click) 252789 226534 6 134 0 0% 0 0 3.802362
etanni (click) 32989 26478 8 114 0 0% 0 0 3.402423
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.849203
fluentd (click) 517903 478874 7 116 0 0% 0 0 3.656413
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.409067
graphql (click) 418579 374791 74 1940 19 0% 0 0 52.728281
graphql-native (click) 362125 299651 39 532 0 0% 0 0 13.430444
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.739999
lee (click) 322871 291574 50 1102 0 0% 0 0 30.615281
matmul (click) 11103 4709 8 136 0 0% 0 0 4.079739
nbody (click) 14448 21176 6 251 0 0% 0 0 6.107743
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.246464
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.230893
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.536648
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.771898
rack (click) 289104 240940 35 581 0 0% 0 0 14.497014
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.705108
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 162.787204
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.784315
splay (click) 34617 22483 9 175 0 0% 0 0 5.171191
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.858943
tinygql (click) 304839 275654 59 1026 5 0% 0 0 26.200381
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1857.903825
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.082073
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.094851
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.492819
fib (click) 2659 2995 3 30 0 0% 0 0 1.128549
getivar (click) 3789 6778 3 79 0 0% 0 0 1.93622
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.299374
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818228
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.901527
object-new (click) 2406 2818 2 36 0 0% 0 0 1.007739
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.273643
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.713858
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.131953
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.773215
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.797714
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.293977
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.730376
setivar (click) 2783 3726 3 46 0 0% 0 0 1.26711
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.405504
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.712334
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.498904
structaref (click) 4407 9095 3 88 0 0% 0 0 2.341369
structaset (click) 4113 5834 3 70 0 0% 0 0 1.790262
throw (click) 5953 4624 5 53 0 0% 0 0 1.755858

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.