Ruby Benchmarks

Details for Benchmarks at 2026-06-11 01:26:34 UTC

YJIT metrics from the ruby-bench suite using Ruby 5e024ad484.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 102.3% faster than CRuby 4.1.0dev
  • 10.9% faster than YJIT 3.4.7
On railsbench it is
  • 117.6% faster than CRuby 4.1.0dev
  • 15.9% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 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 93 5 97 50 192 50 236
chunky-png 5 32 5 30 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 444 50 617 50 677
liquid-compile 5 421 5 519 50 582 50 867
liquid-render 5 170 5 170 50 429 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 210 50 253 50 306
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 153 50 247 50 254
ruby-lsp 5 153 5 159 50 240 50 236
sequel 5 424 5 460 50 602 50 658
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 164 5 174 50 184 50 215
addressable-join 5 75 5 85 50 66 50 84
addressable-merge 5 161 5 159 50 223 50 245
addressable-new 5 352 5 356 50 518 50 555
addressable-normalize 5 53 5 57 50 60 50 73
addressable-parse 5 104 5 109 50 103 50 124
addressable-setters 5 186 5 188 50 234 50 262
addressable-to-s 5 165 5 174 50 183 50 213
binarytrees 5 82 5 84 50 136 50 148
blurhash 5 84 5 83 50 145 50 145
erubi 5 130 5 144 50 140 50 142
etanni 5 100 5 77 50 73 50 43
fannkuchredux 5 55 5 55 50 100 50 102
fluentd 5 61 5 66 50 20 50 25
gcbench 5 10 5 10 50 10 50 18
graphql 5 368 5 456 50 570 50 954
graphql-native 5 58 5 88 50 21 50 75
knucleotide 5 163 5 143 50 117 50 97
lee 5 23 5 31 50 10 50 18
matmul 5 53 5 51 50 88 50 97
nbody 5 250 5 243 50 663 50 689
nqueens 5 119 5 128 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 176 50 697 50 792
protoboeuf-encode 5 201 5 198 50 806 50 777
rack 5 441 5 465 50 703 50 804
ruby-json 5 84 5 114 50 51 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 12
splay 5 207 5 221 50 250 50 278
sudoku 5 48 5 48 50 155 50 168
tinygql 5 41 5 43 50 40 50 54
30k_ifelse 5 28 5 28 50 181 50 184
30k_methods 5 38 5 39 50 457 50 454
attr_accessor 5 157 5 186 50 1816 50 1898
cfunc_itself 5 283 5 327 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 211 5 354 50 2314 50 2452
getivar-module 5 103 5 144 50 89 50 287
keyword_args 5 102 5 105 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 481 50 297 50 1536
object-new-initialize 5 169 5 238 50 259 50 1027
object-new-no-escape 5 81 5 141 50 89 50 528
respond_to 5 139 5 125 50 3898 50 3904
ruby-xor 5 247 5 238 50 1306 50 1309
send_bmethod 5 101 5 115 50 5539 50 4526
send_cfunc_block 5 106 5 104 50 304 50 293
send_rubyfunc_block 5 195 5 204 50 1371 50 1375
setivar 5 359 5 399 50 4930 50 4985
setivar_object 5 341 5 303 50 760 50 590
setivar_young 5 341 5 305 50 809 50 608
str_concat 5 391 5 442 50 1199 50 1093
structaref 5 153 5 198 50 1798 50 1891
structaset 5 198 5 219 50 369 50 486
throw 5 1109 5 1403 50 1440 50 1726

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) 1560348 1305249 203 2688 0 0% 0 0 74.896774
chunky-png (click) 325387 274948 79 1376 1 0% 0 0 38.398957
erubi-rails (click) 1385318 1253973 268 3626 23 0% 0 0 99.936954
hexapdf (click) 1534116 1336848 594 15777 44 0% 0 0 427.648163
liquid-c (click) 565626 516865 114 2240 5 0% 0 0 58.79188
liquid-compile (click) 478413 392480 146 2669 2 0% 0 0 74.315065
liquid-render (click) 672072 542350 131 2963 8 0% 0 0 78.017121
lobsters (click) 8559834 7176531 3123 63404 122 0% 0 0 2023.55952
mail (click) 875460 833840 345 7738 40 0% 0 0 209.040985
psych-load (click) 290967 234079 61 829 2 0% 0 0 23.583978
railsbench (click) 3357865 2817165 1592 19741 105 0% 0 0 535.683362
rubocop (click) 5802606 5020144 3002 57342 128 0% 6 0 1625.627428
ruby-lsp (click) 1051099 938392 409 7470 47 0% 1 0 198.876624
sequel (click) 510796 405204 11 119 0 0% 0 0 4.257889
shipit (click) 6869259 5865392 3134 50090 147 0% 0 0 1604.815276
addressable-equality (click) 323776 257873 44 1380 1 0% 0 0 33.275733
addressable-getters (click) 285844 235915 26 863 0 0% 0 0 20.440842
addressable-join (click) 291218 252600 24 941 0 0% 0 0 23.219342
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.475974
addressable-new (click) 265085 226405 21 563 0 0% 0 0 13.561364
addressable-normalize (click) 319924 261729 43 1327 1 0% 0 0 31.876594
addressable-parse (click) 288561 254174 26 880 0 0% 0 0 21.154793
addressable-setters (click) 265254 236844 20 582 0 0% 0 0 13.927307
addressable-to-s (click) 283721 240754 26 849 0 0% 0 0 19.962721
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.790211
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.80867
erubi (click) 252235 241817 6 134 0 0% 0 0 3.813406
etanni (click) 32989 26478 8 114 0 0% 0 0 3.445158
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.842152
fluentd (click) 516398 516633 7 116 0 0% 0 0 3.670989
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.340095
graphql (click) 417737 372977 73 1931 19 0% 0 0 52.896759
graphql-native (click) 359846 336606 39 532 0 0% 0 0 13.798235
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.605024
lee (click) 321767 305925 49 1093 0 0% 0 0 30.27529
matmul (click) 11103 4709 8 136 0 0% 0 0 4.11568
nbody (click) 14448 21176 6 251 0 0% 0 0 6.144774
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.414521
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.152273
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.794096
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.874735
rack (click) 287943 238901 35 581 0 0% 0 0 14.645615
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.729844
rubyboy (click) 708516 641776 154 6871 42 0% 0 0 162.969434
rubykon (click) 147788 154811 138 2094 4 0% 0 0 55.036514
splay (click) 34617 22483 9 175 0 0% 0 0 5.230849
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.965944
tinygql (click) 304663 282971 59 1026 5 0% 0 0 26.708167
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1872.977325
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.623331
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.105051
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.511998
fib (click) 2659 2995 3 30 0 0% 0 0 1.079877
getivar (click) 3789 6778 3 79 0 0% 0 0 1.907453
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.359316
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.800667
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.956327
object-new (click) 2406 2818 2 36 0 0% 0 0 0.998631
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.270266
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.718957
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.134069
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.774816
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.843572
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.288934
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.736479
setivar (click) 2783 3726 3 46 0 0% 0 0 1.260433
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.413227
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.740485
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.408331
structaref (click) 4407 9095 3 88 0 0% 0 0 2.350665
structaset (click) 4113 5834 3 70 0 0% 0 0 1.779587
throw (click) 5953 4624 5 53 0 0% 0 0 1.776631

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.