Ruby Benchmarks

Details for Benchmarks at 2025-11-19 00:40:10 UTC

YJIT metrics from the ruby-bench suite using Ruby 0f89fa97e3.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 90.4% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 97.7% faster than CRuby 4.0.0dev
  • 3.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 7 minutes
aarch64 runtime: 7 hours, 1 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 84 5 86 50 190 50 223
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 401 50 623 50 547
liquid-compile 5 417 5 473 50 583 50 694
liquid-render 5 171 5 170 50 436 50 327
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 176 50 253 50 217
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 247 50 249
ruby-lsp 5 142 5 148 50 231 50 248
sequel 5 430 5 433 50 585 50 606
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 164 5 163 50 184 50 184
addressable-join 5 74 5 51 50 66 50 17
addressable-merge 5 160 5 152 50 222 50 208
addressable-new 5 352 5 338 50 523 50 482
addressable-normalize 5 53 5 53 50 60 50 55
addressable-parse 5 104 5 101 50 104 50 100
addressable-setters 5 185 5 176 50 231 50 213
addressable-to-s 5 163 5 163 50 183 50 183
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 130 5 128 50 135 50 133
etanni 5 98 5 66 50 71 50 35
fannkuchredux 5 54 5 56 50 101 50 97
fluentd 5 56 5 64 50 20 50 31
graphql 5 373 5 460 50 574 50 917
graphql-native 5 58 5 79 50 23 50 61
knucleotide 5 163 5 162 50 118 50 116
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 51 50 95 50 91
nbody 5 246 5 270 50 676 50 662
nqueens 5 111 5 125 50 556 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 707 50 755
protoboeuf-encode 5 197 5 205 50 836 50 787
rack 5 444 5 435 50 713 50 698
ruby-json 5 82 5 99 50 47 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 148
tinygql 5 41 5 43 50 40 50 48
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 453 50 457
attr_accessor 5 158 5 190 50 1835 50 1908
cfunc_itself 5 348 5 347 50 1255 50 1259
fib 5 124 5 141 50 940 50 939
getivar 5 214 5 308 50 2315 50 2416
keyword_args 5 100 5 108 50 1240 50 1242
loops-times 5 23 5 24 50 64 50 56
object-new 5 268 5 303 50 297 50 448
respond_to 5 139 5 138 50 3887 50 3900
ruby-xor 5 236 5 252 50 1314 50 1288
send_bmethod 5 116 5 125 50 5538 50 5536
send_cfunc_block 5 106 5 106 50 352 50 338
send_rubyfunc_block 5 250 5 246 50 6924 50 6914
setivar 5 360 5 365 50 4926 50 4942
setivar_object 5 341 5 317 50 750 50 601
setivar_young 5 341 5 323 50 797 50 637
str_concat 5 397 5 401 50 1201 50 1182
structaref 5 156 5 178 50 1819 50 1890
structaset 5 203 5 221 50 397 50 355
throw 5 1088 5 1150 50 1422 50 1398

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) 1550986 1332521 205 2579 0 0% 0 0 78.707953
chunky-png (click) 317691 292909 74 1322 1 0% 0 0 37.913419
erubi-rails (click) 1377681 1238419 267 3682 22 0% 0 0 98.709518
hexapdf (click) 1526155 1310200 593 15680 44 0% 0 0 439.824472
liquid-c (click) 556566 488038 114 2230 5 0% 0 0 60.972702
liquid-compile (click) 480993 433671 146 2735 2 0% 0 0 80.473936
liquid-render (click) 662978 521630 131 2946 8 0% 0 0 79.931183
lobsters (click) 8514618 7247661 3100 62256 118 0% 0 0 2104.424877
mail (click) 865542 827531 342 7700 40 0% 0 0 215.465456
psych-load (click) 289049 267233 61 832 2 0% 0 0 23.922906
railsbench (click) 3356483 2794199 1605 19549 47 0% 0 0 550.952499
rubocop (click) 5763216 4869833 3001 56878 127 0% 6 0 1693.036539
ruby-lsp (click) 964266 835290 347 6786 45 0% 1 0 184.123438
sequel (click) 503548 440546 11 119 0 0% 0 0 4.015572
shipit (click) 7938015 6698714 3397 55400 186 0% 1 0 1839.304312
addressable-equality (click) 317171 262071 44 1406 1 0% 0 0 34.97887
addressable-getters (click) 267149 217171 26 863 0 0% 0 0 20.944923
addressable-join (click) 285328 231171 24 941 0 0% 0 0 23.782567
addressable-merge (click) 284992 225200 27 896 0 0% 0 0 22.352342
addressable-new (click) 258051 205354 21 591 0 0% 0 0 14.681
addressable-normalize (click) 313514 241431 43 1363 1 0% 0 0 33.714887
addressable-parse (click) 282270 232408 26 880 0 0% 0 0 21.882514
addressable-setters (click) 260179 200624 20 584 0 0% 0 0 14.579083
addressable-to-s (click) 279166 204916 26 849 0 0% 0 0 20.783351
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.827697
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.026777
erubi (click) 248592 224096 6 134 0 0% 0 0 3.92319
etanni (click) 32930 35718 8 114 0 0% 0 0 3.611745
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.034093
fluentd (click) 491352 393571 7 115 0 0% 0 0 3.75387
graphql (click) 410784 386810 73 1921 19 0% 0 0 53.765388
graphql-native (click) 355239 304231 39 532 0 0% 0 0 13.907643
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.927429
lee (click) 318622 289344 49 1097 0 0% 0 0 31.665597
matmul (click) 11103 4709 8 136 0 0% 0 0 4.203498
nbody (click) 14448 21176 6 251 0 0% 0 0 6.188041
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.395751
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.852033
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 73.116349
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 44.497171
rack (click) 281510 274174 35 580 0 0% 0 0 16.081718
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.780141
rubyboy (click) 702983 596745 154 6864 42 0% 0 0 169.669911
rubykon (click) 146229 153926 137 2070 3 0% 0 0 56.33112
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.694015
tinygql (click) 301262 280591 59 1031 5 0% 0 0 27.254775
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1933.195029
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.370996
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.107808
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.526488
fib (click) 2659 2995 3 30 0 0% 0 0 1.101867
getivar (click) 3789 6778 3 79 0 0% 0 0 1.943341
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.809275
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.904094
object-new (click) 2406 2818 2 36 0 0% 0 0 1.109315
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.184678
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.883489
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.761449
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.312759
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.473408
setivar (click) 2783 3726 3 46 0 0% 0 0 1.271236
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.429273
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.699346
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.461483
structaref (click) 4407 9095 3 88 0 0% 0 0 2.350043
structaset (click) 3926 5614 3 70 0 0% 0 0 1.71649
throw (click) 5953 4624 5 53 0 0% 0 0 1.830948

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.