Ruby Benchmarks

Details for Benchmarks at 2026-05-03 01:14:24 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.1% faster than CRuby 4.1.0dev
  • 8.4% faster than YJIT 3.4.7
On railsbench it is
  • 115.9% faster than CRuby 4.1.0dev
  • 14.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 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 92 50 199 50 245
chunky-png 5 32 5 31 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 421 5 439 50 619 50 660
liquid-compile 5 418 5 482 50 549 50 758
liquid-render 5 171 5 172 50 432 50 458
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 201 50 254 50 288
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 246 50 253
ruby-lsp 5 164 5 165 50 239 50 236
sequel 5 426 5 446 50 596 50 628
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 12
addressable-getters 5 165 5 167 50 184 50 198
addressable-join 5 75 5 80 50 66 50 73
addressable-merge 5 161 5 154 50 221 50 224
addressable-new 5 352 5 341 50 518 50 526
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 104 5 103 50 104 50 111
addressable-setters 5 186 5 178 50 234 50 233
addressable-to-s 5 163 5 167 50 183 50 197
binarytrees 5 81 5 86 50 136 50 168
blurhash 5 83 5 84 50 145 50 145
erubi 5 139 5 149 50 135 50 151
etanni 5 100 5 80 50 72 50 46
fannkuchredux 5 54 5 57 50 100 50 106
fluentd 5 62 5 61 50 23 50 26
gcbench 5 10 5 10 50 10 50 15
graphql 5 373 5 450 50 566 50 951
graphql-native 5 57 5 89 50 22 50 70
knucleotide 5 164 5 144 50 117 50 97
lee 5 23 5 31 50 10 50 17
matmul 5 53 5 56 50 88 50 98
nbody 5 250 5 283 50 662 50 630
nqueens 5 119 5 124 50 554 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 180 50 697 50 788
protoboeuf-encode 5 201 5 191 50 802 50 831
rack 5 442 5 447 50 717 50 743
ruby-json 5 84 5 109 50 50 50 86
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 11
splay 5 209 5 227 50 250 50 283
sudoku 5 48 5 49 50 155 50 158
tinygql 5 42 5 40 50 36 50 51
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 38 5 39 50 452 50 454
attr_accessor 5 156 5 184 50 1832 50 1897
cfunc_itself 5 348 5 314 50 1255 50 1259
fib 5 124 5 135 50 937 50 939
getivar 5 210 5 291 50 2312 50 2403
getivar-module 5 99 5 120 50 88 50 259
keyword_args 5 102 5 102 50 1239 50 1243
loops-times 5 23 5 25 50 63 50 56
object-new 5 268 5 471 50 297 50 1515
object-new-initialize 5 169 5 255 50 260 50 1017
object-new-no-escape 5 80 5 138 50 89 50 519
respond_to 5 139 5 127 50 3904 50 3899
ruby-xor 5 246 5 223 50 1306 50 1309
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 107 50 306 50 300
send_rubyfunc_block 5 195 5 206 50 1370 50 1374
setivar 5 359 5 464 50 4929 50 5022
setivar_object 5 341 5 340 50 766 50 605
setivar_young 5 341 5 340 50 807 50 615
str_concat 5 391 5 445 50 1201 50 1173
structaref 5 137 5 187 50 1799 50 1870
structaset 5 197 5 206 50 371 50 475
throw 5 1108 5 1393 50 1443 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) 1560154 1330312 203 2662 0 0% 0 0 73.723425
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.161625
erubi-rails (click) 1378291 1211367 268 3638 23 0% 0 0 94.723023
hexapdf (click) 1531818 1358513 593 15778 44 0% 0 0 430.198581
liquid-c (click) 566018 436042 114 2240 5 0% 0 0 59.069213
liquid-compile (click) 485821 450136 146 2761 2 0% 0 0 88.068881
liquid-render (click) 672279 633085 131 2963 8 0% 0 0 77.524377
lobsters (click) 8573589 7238244 3124 63672 122 0% 0 0 2042.955465
mail (click) 876352 850850 345 7738 40 0% 0 0 208.805095
psych-load (click) 292898 252665 61 833 2 0% 0 0 23.866886
railsbench (click) 3350861 2929716 1592 19742 104 0% 0 0 536.207799
rubocop (click) 5789115 4970532 3002 57191 127 0% 6 0 1645.511788
ruby-lsp (click) 1045996 857497 409 7472 47 0% 1 0 200.0807
sequel (click) 506568 473742 11 119 0 0% 0 0 5.019353
shipit (click) 6914732 5792260 3135 50250 147 0% 0 0 1635.02398
addressable-equality (click) 318141 243403 44 1380 1 0% 0 0 35.935593
addressable-getters (click) 282294 248492 26 869 0 0% 0 0 22.482431
addressable-join (click) 287506 240390 24 945 0 0% 0 0 27.040725
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 24.293489
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.56645
addressable-normalize (click) 316840 291825 43 1327 1 0% 0 0 33.230984
addressable-parse (click) 285005 258554 26 886 0 0% 0 0 23.298363
addressable-setters (click) 258914 205402 20 582 0 0% 0 0 15.898271
addressable-to-s (click) 281740 247235 26 853 0 0% 0 0 21.927151
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.750449
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.913583
erubi (click) 251950 200403 6 134 0 0% 0 0 3.936292
etanni (click) 32989 26478 8 114 0 0% 0 0 3.413789
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.805222
fluentd (click) 489306 468353 7 116 0 0% 0 0 3.666845
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.612649
graphql (click) 413615 376062 73 1931 19 0% 0 0 52.986619
graphql-native (click) 358270 335438 39 532 0 0% 0 0 13.771794
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.690241
lee (click) 320289 279011 49 1093 0 0% 0 0 30.25278
matmul (click) 11103 4709 8 136 0 0% 0 0 4.087434
nbody (click) 14448 21176 6 251 0 0% 0 0 6.170144
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.21153
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.949255
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.781104
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.310255
rack (click) 287224 271413 35 628 0 0% 0 0 17.235703
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.83315
rubyboy (click) 708976 666783 154 6873 42 0% 0 0 163.487287
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.616697
splay (click) 34953 22682 9 175 0 0% 0 0 5.204406
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.89659
tinygql (click) 303135 264161 59 1026 5 0% 0 0 26.274028
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1870.1513
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.568578
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.067815
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.483031
fib (click) 2659 2995 3 30 0 0% 0 0 1.09553
getivar (click) 3789 6778 3 79 0 0% 0 0 1.931478
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.32018
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.803146
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92146
object-new (click) 2406 2818 2 36 0 0% 0 0 1.004256
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.268242
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.016645
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.119206
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.75384
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.797822
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.259639
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.74391
setivar (click) 2783 3726 3 46 0 0% 0 0 1.204498
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.41105
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.734629
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.425966
structaref (click) 4407 9095 3 88 0 0% 0 0 2.29041
structaset (click) 4113 5834 3 70 0 0% 0 0 1.771051
throw (click) 5953 4624 5 53 0 0% 0 0 1.727735

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.