Ruby Benchmarks

Details for Benchmarks at 2026-03-04 00:50:32 UTC

YJIT metrics from the ruby-bench suite using Ruby 2be717ae7f.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.8% faster than CRuby 4.1.0dev
  • 8.1% faster than YJIT 3.4.7
On railsbench it is
  • 115.2% faster than CRuby 4.1.0dev
  • 13.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 16 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 91 5 98 50 199 50 244
chunky-png 5 31 5 32 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 422 5 435 50 624 50 635
liquid-compile 5 420 5 486 50 551 50 741
liquid-render 5 171 5 176 50 432 50 452
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 197 50 252 50 279
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 160 50 248 50 255
ruby-lsp 5 159 5 162 50 216 50 235
sequel 5 426 5 442 50 583 50 631
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 163 5 173 50 184 50 208
addressable-join 5 72 5 79 50 63 50 76
addressable-merge 5 161 5 162 50 222 50 227
addressable-new 5 349 5 358 50 522 50 538
addressable-normalize 5 53 5 56 50 59 50 64
addressable-parse 5 103 5 108 50 104 50 115
addressable-setters 5 184 5 188 50 228 50 246
addressable-to-s 5 163 5 175 50 182 50 201
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 151 50 118 50 158
etanni 5 97 5 73 50 71 50 39
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 61 50 20 50 32
graphql 5 370 5 470 50 537 50 936
graphql-native 5 57 5 89 50 22 50 69
knucleotide 5 163 5 157 50 118 50 111
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 94 50 95
nbody 5 246 5 270 50 676 50 683
nqueens 5 116 5 128 50 557 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 177 50 707 50 759
protoboeuf-encode 5 197 5 205 50 832 50 813
rack 5 446 5 462 50 704 50 736
ruby-json 5 84 5 105 50 46 50 76
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 164
tinygql 5 40 5 44 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 456 50 455
attr_accessor 5 157 5 199 50 1835 50 1924
cfunc_itself 5 349 5 333 50 1255 50 1259
fib 5 124 5 144 50 939 50 940
getivar 5 217 5 298 50 2318 50 2406
getivar-module 5 104 5 125 50 90 50 261
keyword_args 5 100 5 108 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 61
object-new 5 268 5 418 50 298 50 923
respond_to 5 139 5 138 50 3888 50 3901
ruby-xor 5 236 5 235 50 1314 50 1297
send_bmethod 5 117 5 122 50 5538 50 4525
send_cfunc_block 5 107 5 106 50 353 50 384
send_rubyfunc_block 5 250 5 252 50 6924 50 6920
setivar 5 360 5 434 50 4922 50 5009
setivar_object 5 341 5 302 50 750 50 631
setivar_young 5 341 5 304 50 796 50 647
str_concat 5 390 5 453 50 1200 50 1192
structaref 5 156 5 192 50 1804 50 1883
structaset 5 201 5 226 50 399 50 491
throw 5 1084 5 1385 50 1420 50 1827

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) 1545942 1286731 203 2642 0 0% 0 0 74.970199
chunky-png (click) 321334 271355 79 1376 1 0% 0 0 39.564913
erubi-rails (click) 1382393 1146358 268 3700 22 0% 0 0 100.531915
hexapdf (click) 1524972 1288258 593 15706 44 0% 0 0 439.626879
liquid-c (click) 558566 472183 114 2236 5 0% 0 0 60.22594
liquid-compile (click) 480542 415026 146 2710 2 0% 0 0 78.427564
liquid-render (click) 665643 563242 131 2959 8 0% 0 0 80.207129
lobsters (click) 8692933 7283437 3123 64080 120 0% 0 0 2210.861237
mail (click) 869775 803876 345 7728 40 0% 0 0 214.479942
psych-load (click) 288728 257468 61 831 2 0% 0 0 24.159639
railsbench (click) 3354112 2944503 1592 19731 97 0% 0 0 551.21082
rubocop (click) 5778971 5076794 3002 57097 125 0% 6 0 1667.463714
ruby-lsp (click) 1040980 927537 409 7472 47 0% 1 0 204.295594
sequel (click) 494106 376853 11 119 0 0% 0 0 3.917795
shipit (click) 7280860 6155577 3381 53999 169 0% 1 0 1793.569884
addressable-equality (click) 317411 285160 44 1382 1 0% 0 0 34.507313
addressable-getters (click) 277579 227911 26 863 0 0% 0 0 20.754246
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.734238
addressable-merge (click) 283124 247322 27 896 0 0% 0 0 22.020346
addressable-new (click) 257960 228451 21 563 0 0% 0 0 14.024604
addressable-normalize (click) 315107 257958 43 1395 1 0% 0 0 34.236692
addressable-parse (click) 280340 221643 26 880 0 0% 0 0 21.484716
addressable-setters (click) 257526 238445 20 582 0 0% 0 0 14.590839
addressable-to-s (click) 275256 249972 26 849 0 0% 0 0 20.478217
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.800865
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.191173
erubi (click) 245992 219893 6 134 0 0% 0 0 3.949098
etanni (click) 33355 27108 8 114 0 0% 0 0 3.448762
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.069388
fluentd (click) 489566 461147 7 116 0 0% 0 0 3.731343
graphql (click) 411944 367423 73 1909 19 0% 0 0 53.28495
graphql-native (click) 354831 325070 39 532 0 0% 0 0 14.082667
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.88932
lee (click) 318016 253443 49 1099 0 0% 0 0 31.073314
matmul (click) 11103 4709 8 136 0 0% 0 0 4.200396
nbody (click) 14448 21176 6 251 0 0% 0 0 6.166236
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.325438
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.687027
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.960911
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.650727
rack (click) 283744 243401 35 581 0 0% 0 0 15.015397
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.745504
rubyboy (click) 706637 648887 154 6873 42 0% 0 0 167.945516
rubykon (click) 149667 148880 138 2117 4 0% 0 0 57.145572
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.113426
tinygql (click) 301061 279881 59 1031 5 0% 0 0 27.19673
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1956.783495
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.635103
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.076265
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.49718
fib (click) 2659 2995 3 30 0 0% 0 0 1.14268
getivar (click) 3789 6778 3 79 0 0% 0 0 1.935113
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.328692
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.791803
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.95117
object-new (click) 2406 2818 2 36 0 0% 0 0 1.075694
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.112054
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.796658
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.841024
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.786701
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.457606
setivar (click) 2783 3726 3 46 0 0% 0 0 1.266012
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.397866
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.73487
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.424559
structaref (click) 4407 9095 3 88 0 0% 0 0 2.360709
structaset (click) 4113 5834 3 70 0 0% 0 0 1.791872
throw (click) 5953 4624 5 53 0 0% 0 0 1.762547

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.