Ruby Benchmarks

Details for Benchmarks at 2026-05-11 01:17:02 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.7% faster than CRuby 4.1.0dev
  • 8.0% faster than YJIT 3.4.7
On railsbench it is
  • 115.1% faster than CRuby 4.1.0dev
  • 14.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 49 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 94 50 201 50 225
chunky-png 5 32 5 31 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 438 50 616 50 665
liquid-compile 5 407 5 490 50 583 50 764
liquid-render 5 172 5 173 50 436 50 465
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 201 50 254 50 286
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 257
ruby-lsp 5 157 5 164 50 221 50 233
sequel 5 426 5 447 50 598 50 636
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 13
addressable-getters 5 165 5 166 50 184 50 199
addressable-join 5 76 5 78 50 65 50 73
addressable-merge 5 162 5 150 50 222 50 224
addressable-new 5 352 5 336 50 519 50 524
addressable-normalize 5 53 5 54 50 60 50 61
addressable-parse 5 104 5 102 50 104 50 111
addressable-setters 5 186 5 174 50 233 50 231
addressable-to-s 5 164 5 166 50 183 50 198
binarytrees 5 81 5 86 50 136 50 167
blurhash 5 84 5 84 50 145 50 145
erubi 5 136 5 154 50 129 50 158
etanni 5 100 5 81 50 72 50 47
fannkuchredux 5 55 5 58 50 101 50 105
fluentd 5 58 5 60 50 20 50 31
gcbench 5 10 5 10 50 10 50 16
graphql 5 372 5 441 50 573 50 952
graphql-native 5 59 5 88 50 22 50 70
knucleotide 5 163 5 144 50 117 50 98
lee 5 23 5 31 50 10 50 17
matmul 5 53 5 55 50 87 50 90
nbody 5 249 5 279 50 663 50 703
nqueens 5 119 5 125 50 554 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 184 50 698 50 811
protoboeuf-encode 5 201 5 200 50 808 50 798
rack 5 443 5 444 50 716 50 725
ruby-json 5 84 5 106 50 50 50 84
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 220 50 250 50 280
sudoku 5 48 5 50 50 155 50 157
tinygql 5 41 5 41 50 35 50 52
30k_ifelse 5 28 5 28 50 185 50 186
30k_methods 5 38 5 39 50 459 50 444
attr_accessor 5 157 5 182 50 1834 50 1893
cfunc_itself 5 346 5 324 50 1255 50 1257
fib 5 125 5 135 50 939 50 939
getivar 5 211 5 331 50 2315 50 2438
getivar-module 5 103 5 141 50 88 50 226
keyword_args 5 103 5 100 50 1190 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 464 50 298 50 1497
object-new-initialize 5 169 5 206 50 259 50 1020
object-new-no-escape 5 80 5 138 50 89 50 516
respond_to 5 139 5 126 50 3895 50 3902
ruby-xor 5 247 5 232 50 1306 50 1295
send_bmethod 5 118 5 118 50 5539 50 4526
send_cfunc_block 5 106 5 106 50 305 50 311
send_rubyfunc_block 5 196 5 201 50 1371 50 1375
setivar 5 359 5 372 50 4930 50 4951
setivar_object 5 341 5 292 50 763 50 595
setivar_young 5 341 5 293 50 807 50 608
str_concat 5 391 5 452 50 1202 50 1167
structaref 5 153 5 186 50 1798 50 1869
structaset 5 197 5 234 50 367 50 483
throw 5 1108 5 1407 50 1443 50 1930

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) 1560423 1338691 203 2659 0 0% 0 0 73.370075
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.335045
erubi-rails (click) 1384696 1244994 268 3626 23 0% 0 0 93.131121
hexapdf (click) 1539235 1359724 593 15833 44 0% 0 0 432.804804
liquid-c (click) 566385 485658 114 2240 5 0% 0 0 58.478311
liquid-compile (click) 486968 426952 146 2749 2 0% 0 0 79.274524
liquid-render (click) 670029 647004 131 2963 8 0% 0 0 77.640889
lobsters (click) 8567605 7133259 3125 63483 122 0% 0 0 2038.084801
mail (click) 876774 875920 345 7738 40 0% 0 0 208.456523
psych-load (click) 291506 259198 61 829 2 0% 0 0 23.195912
railsbench (click) 3358345 3062406 1592 19740 104 0% 0 0 534.752132
rubocop (click) 5787480 5035165 3002 57184 128 0% 6 0 1635.73428
ruby-lsp (click) 1047520 925562 409 7472 47 0% 1 0 200.098791
sequel (click) 508506 451699 11 119 0 0% 0 0 3.754258
shipit (click) 6896404 5771696 3136 50244 147 0% 0 0 1618.366924
addressable-equality (click) 321431 272212 44 1380 1 0% 0 0 35.990171
addressable-getters (click) 282294 248492 26 869 0 0% 0 0 22.145742
addressable-join (click) 287506 240390 24 945 0 0% 0 0 26.806769
addressable-merge (click) 286303 241477 27 900 0 0% 0 0 23.526448
addressable-new (click) 262524 248859 21 569 0 0% 0 0 14.372246
addressable-normalize (click) 316812 266993 43 1326 1 0% 0 0 33.953652
addressable-parse (click) 283814 240672 26 886 0 0% 0 0 22.987419
addressable-setters (click) 262194 250590 20 582 0 0% 0 0 16.407755
addressable-to-s (click) 281376 246901 26 849 0 0% 0 0 21.556481
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.849811
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.892694
erubi (click) 251950 200403 6 134 0 0% 0 0 3.912944
etanni (click) 32989 26478 8 114 0 0% 0 0 3.391785
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.860305
fluentd (click) 491603 430356 7 116 0 0% 0 0 3.579725
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.673717
graphql (click) 415285 370301 73 1931 19 0% 0 0 52.712616
graphql-native (click) 358579 294884 39 532 0 0% 0 0 13.727104
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.722071
lee (click) 318484 285507 49 1093 0 0% 0 0 30.172693
matmul (click) 11103 4709 8 136 0 0% 0 0 4.064206
nbody (click) 14448 21176 6 251 0 0% 0 0 6.189351
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.253371
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.867345
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.824019
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.369037
rack (click) 290780 266759 35 625 0 0% 0 0 17.387948
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.71389
rubyboy (click) 705866 663088 154 6873 42 0% 0 0 162.427707
rubykon (click) 148271 147165 138 2099 4 0% 0 0 55.165637
splay (click) 34953 22682 9 175 0 0% 0 0 5.21654
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.861083
tinygql (click) 304373 274325 59 1026 5 0% 0 0 26.417304
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.989426
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.04616
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.136628
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.495264
fib (click) 2659 2995 3 30 0 0% 0 0 1.106202
getivar (click) 3789 6778 3 79 0 0% 0 0 1.929266
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.337273
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.81083
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.922134
object-new (click) 2406 2818 2 36 0 0% 0 0 1.001749
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.301922
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.954705
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.095203
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.76671
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.830839
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.250653
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.786596
setivar (click) 2783 3726 3 46 0 0% 0 0 1.256858
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408285
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.729546
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.412575
structaref (click) 4407 9095 3 88 0 0% 0 0 2.310777
structaset (click) 4113 5834 3 70 0 0% 0 0 1.775757
throw (click) 5953 4624 5 53 0 0% 0 0 1.719872

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.