Ruby Benchmarks

Details for Benchmarks at 2026-04-06 01:00:48 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.9% faster than CRuby 4.1.0dev
  • 6.7% faster than YJIT 3.4.7
On railsbench it is
  • 115.0% faster than CRuby 4.1.0dev
  • 14.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 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 92 5 95 50 197 50 237
chunky-png 5 32 5 30 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 430 50 617 50 636
liquid-compile 5 418 5 481 50 581 50 737
liquid-render 5 171 5 172 50 430 50 448
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 200 50 253 50 266
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 246 50 258
ruby-lsp 5 153 5 167 50 224 50 239
sequel 5 429 5 433 50 602 50 604
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 166 5 166 50 182 50 198
addressable-join 5 74 5 79 50 66 50 73
addressable-merge 5 160 5 153 50 222 50 225
addressable-new 5 354 5 340 50 521 50 525
addressable-normalize 5 53 5 54 50 60 50 57
addressable-parse 5 104 5 102 50 103 50 111
addressable-setters 5 185 5 175 50 231 50 228
addressable-to-s 5 165 5 165 50 181 50 198
binarytrees 5 82 5 84 50 136 50 161
blurhash 5 84 5 84 50 145 50 145
erubi 5 136 5 139 50 141 50 146
etanni 5 101 5 78 50 72 50 45
fannkuchredux 5 55 5 56 50 101 50 103
fluentd 5 56 5 61 50 20 50 38
gcbench 5 10 5 10 50 10 50 16
graphql 5 370 5 442 50 568 50 940
graphql-native 5 59 5 88 50 22 50 71
knucleotide 5 163 5 141 50 117 50 94
lee 5 23 5 29 50 10 50 10
matmul 5 53 5 56 50 88 50 97
nbody 5 250 5 275 50 663 50 703
nqueens 5 119 5 125 50 554 50 572
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 697 50 811
protoboeuf-encode 5 200 5 197 50 803 50 828
rack 5 439 5 425 50 714 50 679
ruby-json 5 84 5 104 50 51 50 82
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 206 5 222 50 247 50 284
sudoku 5 48 5 49 50 155 50 158
tinygql 5 41 5 41 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 456 50 453
attr_accessor 5 157 5 180 50 1816 50 1889
cfunc_itself 5 346 5 311 50 1255 50 1259
fib 5 125 5 133 50 939 50 939
getivar 5 210 5 292 50 2306 50 2407
getivar-module 5 103 5 130 50 89 50 263
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 473 50 295 50 1485
object-new-initialize 5 169 5 254 50 259 50 942
object-new-no-escape 5 81 5 139 50 89 50 507
respond_to 5 139 5 132 50 3901 50 3893
ruby-xor 5 247 5 232 50 1305 50 1294
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 107 5 105 50 306 50 283
send_rubyfunc_block 5 196 5 204 50 1372 50 1376
setivar 5 359 5 469 50 4930 50 5037
setivar_object 5 341 5 347 50 762 50 666
setivar_young 5 341 5 346 50 809 50 695
str_concat 5 391 5 448 50 1202 50 1176
structaref 5 153 5 181 50 1799 50 1864
structaset 5 197 5 218 50 371 50 471
throw 5 1108 5 1356 50 1438 50 1728

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) 1553825 1324862 203 2665 0 0% 0 0 75.011746
chunky-png (click) 323012 304978 79 1376 1 0% 0 0 38.513869
erubi-rails (click) 1385166 1246224 268 3683 23 0% 0 0 96.406658
hexapdf (click) 1527567 1314401 593 15708 44 0% 0 0 427.213443
liquid-c (click) 561366 506269 114 2236 5 0% 0 0 59.03041
liquid-compile (click) 478305 411199 146 2671 2 0% 0 0 75.720766
liquid-render (click) 667148 554965 131 2959 8 0% 0 0 78.892914
lobsters (click) 8683748 7251621 3125 64237 122 0% 0 0 2069.089434
mail (click) 873248 823297 345 7728 40 0% 0 0 209.591158
psych-load (click) 292264 219383 61 831 2 0% 0 0 23.542495
railsbench (click) 3358938 2908083 1592 19758 104 0% 0 0 536.136264
rubocop (click) 5780573 4955228 3002 57096 127 0% 6 0 1633.413785
ruby-lsp (click) 1045807 801186 409 7462 47 0% 1 0 203.560414
sequel (click) 505368 448265 11 119 0 0% 0 0 3.990341
shipit (click) 6930474 5935667 3133 50428 147 0% 0 0 1628.222363
addressable-equality (click) 322136 265005 44 1396 1 0% 0 0 33.126259
addressable-getters (click) 285942 252234 26 991 0 0% 0 0 24.100306
addressable-join (click) 290644 236345 24 1021 0 0% 0 0 26.085923
addressable-merge (click) 287446 242967 27 900 0 0% 0 0 22.335217
addressable-new (click) 243517 209666 21 569 0 0% 0 0 13.787069
addressable-normalize (click) 317126 275612 43 1327 1 0% 0 0 31.022081
addressable-parse (click) 282920 248058 26 886 0 0% 0 0 21.980253
addressable-setters (click) 260270 215729 20 584 0 0% 0 0 14.663009
addressable-to-s (click) 283289 232936 26 889 0 0% 0 0 21.776968
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.813937
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.936187
erubi (click) 249865 230847 6 134 0 0% 0 0 3.994306
etanni (click) 32981 26478 8 114 0 0% 0 0 3.471226
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.839559
fluentd (click) 491301 430744 7 116 0 0% 0 0 3.711043
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.479366
graphql (click) 395314 313622 73 1909 18 0% 0 0 52.462618
graphql-native (click) 358104 335342 39 532 0 0% 0 0 13.784154
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.692348
lee (click) 319622 262388 49 1099 0 0% 0 0 30.782258
matmul (click) 11103 4709 8 136 0 0% 0 0 4.14509
nbody (click) 14448 21176 6 251 0 0% 0 0 6.183147
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.288295
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.426715
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.675571
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.540417
rack (click) 289051 240838 35 656 0 0% 0 0 16.966358
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.740363
rubyboy (click) 708879 617623 154 6873 42 0% 0 0 163.336944
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.751317
splay (click) 34953 22682 9 175 0 0% 0 0 5.214067
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.945884
tinygql (click) 303219 281095 59 1037 5 0% 0 0 27.224208
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1871.004924
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 478.525
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.087834
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.522956
fib (click) 2659 2995 3 30 0 0% 0 0 1.126263
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936184
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.359846
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.842187
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.935657
object-new (click) 2406 2818 2 36 0 0% 0 0 0.993455
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.27387
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.994336
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.184625
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.818855
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.766334
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.295287
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.718538
setivar (click) 2783 3726 3 46 0 0% 0 0 1.26051
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.424692
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.717107
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.4177
structaref (click) 4407 9095 3 88 0 0% 0 0 2.339352
structaset (click) 4113 5834 3 70 0 0% 0 0 1.800464
throw (click) 5953 4624 5 53 0 0% 0 0 1.75242

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.