Ruby Benchmarks

Details for Benchmarks at 2026-05-19 01:20:10 UTC

YJIT metrics from the ruby-bench suite using Ruby 90ed85f91e.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.3% faster than CRuby 4.1.0dev
  • 10.8% faster than YJIT 3.4.7
On railsbench it is
  • 122.4% faster than CRuby 4.1.0dev
  • 17.1% 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 91 5 95 50 190 50 245
chunky-png 5 32 5 31 50 34 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 447 50 617 50 682
liquid-compile 5 421 5 515 50 551 50 861
liquid-render 5 173 5 174 50 437 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 206 50 253 50 312
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 248 50 253
ruby-lsp 5 163 5 162 50 239 50 235
sequel 5 428 5 469 50 600 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 28 50 12 50 19
addressable-getters 5 165 5 173 50 183 50 216
addressable-join 5 73 5 86 50 66 50 86
addressable-merge 5 159 5 160 50 223 50 249
addressable-new 5 351 5 349 50 522 50 552
addressable-normalize 5 53 5 56 50 60 50 72
addressable-parse 5 104 5 108 50 104 50 124
addressable-setters 5 185 5 189 50 233 50 263
addressable-to-s 5 164 5 172 50 182 50 215
binarytrees 5 82 5 86 50 136 50 147
blurhash 5 84 5 83 50 145 50 145
erubi 5 137 5 149 50 139 50 152
etanni 5 100 5 79 50 73 50 46
fannkuchredux 5 55 5 57 50 101 50 108
fluentd 5 62 5 63 50 21 50 29
gcbench 5 10 5 10 50 10 50 18
graphql 5 372 5 461 50 571 50 982
graphql-native 5 59 5 90 50 23 50 72
knucleotide 5 163 5 140 50 118 50 94
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 52 50 88 50 99
nbody 5 250 5 251 50 662 50 671
nqueens 5 119 5 125 50 555 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 698 50 809
protoboeuf-encode 5 201 5 189 50 808 50 792
rack 5 442 5 467 50 706 50 814
ruby-json 5 83 5 114 50 50 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 223 50 250 50 275
sudoku 5 48 5 49 50 155 50 167
tinygql 5 42 5 42 50 36 50 56
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 456 50 453
attr_accessor 5 156 5 191 50 1831 50 1909
cfunc_itself 5 347 5 317 50 1255 50 1259
fib 5 124 5 135 50 939 50 939
getivar 5 191 5 311 50 2313 50 2423
getivar-module 5 103 5 129 50 89 50 279
keyword_args 5 93 5 104 50 1240 50 1243
loops-times 5 23 5 24 50 63 50 60
object-new 5 268 5 470 50 297 50 1524
object-new-initialize 5 169 5 231 50 259 50 1030
object-new-no-escape 5 80 5 138 50 89 50 522
respond_to 5 139 5 122 50 3901 50 3900
ruby-xor 5 247 5 232 50 1306 50 1299
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 106 5 107 50 306 50 312
send_rubyfunc_block 5 196 5 200 50 1372 50 1376
setivar 5 359 5 407 50 4931 50 4985
setivar_object 5 341 5 312 50 762 50 599
setivar_young 5 341 5 312 50 810 50 611
str_concat 5 391 5 460 50 1201 50 1143
structaref 5 153 5 199 50 1796 50 1893
structaset 5 197 5 240 50 369 50 488
throw 5 1108 5 1308 50 1442 50 1597

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) 1562470 1365831 203 2657 0 0% 0 0 73.513954
chunky-png (click) 325370 274968 79 1376 1 0% 0 0 38.18458
erubi-rails (click) 1389973 1210685 268 3638 23 0% 0 0 94.424195
hexapdf (click) 1535242 1338419 593 15780 44 0% 0 0 433.62652
liquid-c (click) 566605 477590 114 2240 5 0% 0 0 58.803786
liquid-compile (click) 488439 420499 146 2749 2 0% 0 0 78.225312
liquid-render (click) 669977 613436 131 2963 8 0% 0 0 77.53429
lobsters (click) 8577132 7237664 3125 63567 122 0% 0 0 2060.583429
mail (click) 876862 876130 345 7738 40 0% 0 0 208.4737
psych-load (click) 293121 269475 61 833 2 0% 0 0 23.877743
railsbench (click) 3358943 2933316 1592 19747 105 0% 0 0 567.929448
rubocop (click) 5803852 5078697 3002 57335 127 0% 6 0 1627.442004
ruby-lsp (click) 1053833 925488 409 7472 47 0% 1 0 199.159191
sequel (click) 495742 392483 11 119 0 0% 0 0 4.539626
shipit (click) 7116151 5978604 3123 50310 147 0% 0 0 1613.726097
addressable-equality (click) 326258 293926 44 1396 1 0% 0 0 33.773486
addressable-getters (click) 274639 245827 26 863 0 0% 0 0 20.150561
addressable-join (click) 280429 213688 24 945 0 0% 0 0 23.148084
addressable-merge (click) 291176 238696 27 896 0 0% 0 0 21.594934
addressable-new (click) 266598 245019 21 569 0 0% 0 0 13.945536
addressable-normalize (click) 320912 296162 43 1327 1 0% 0 0 31.757879
addressable-parse (click) 288554 254154 26 880 0 0% 0 0 21.114428
addressable-setters (click) 266268 263119 20 582 0 0% 0 0 14.231185
addressable-to-s (click) 285445 251253 26 849 0 0% 0 0 20.220584
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.76473
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.763999
erubi (click) 252223 233645 6 134 0 0% 0 0 3.864174
etanni (click) 32989 26478 8 114 0 0% 0 0 3.412788
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.856548
fluentd (click) 484078 386971 7 116 0 0% 0 0 3.626516
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.333973
graphql (click) 417720 381169 73 1931 19 0% 0 0 52.581429
graphql-native (click) 349523 274348 39 532 0 0% 0 0 13.789028
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.754035
lee (click) 321689 281311 49 1093 0 0% 0 0 30.162575
matmul (click) 11103 4709 8 136 0 0% 0 0 4.084737
nbody (click) 14448 21176 6 251 0 0% 0 0 6.158164
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.247375
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.769771
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.774913
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.933296
rack (click) 288914 273741 35 656 0 0% 0 0 16.444608
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.677525
rubyboy (click) 708696 633751 154 6873 42 0% 0 0 163.221179
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.214356
splay (click) 34953 22682 9 175 0 0% 0 0 5.277533
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.852644
tinygql (click) 305175 291676 59 1032 5 0% 0 0 26.582025
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1863.812419
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.870264
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.098946
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.51383
fib (click) 2659 2995 3 30 0 0% 0 0 1.079285
getivar (click) 3789 6778 3 79 0 0% 0 0 1.900124
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.34985
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.810951
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.922041
object-new (click) 2406 2818 2 36 0 0% 0 0 0.997889
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.270432
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.949927
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.145912
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.789577
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.782591
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.291728
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.726993
setivar (click) 2783 3726 3 46 0 0% 0 0 1.276043
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.40859
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.719378
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.454405
structaref (click) 4407 9095 3 88 0 0% 0 0 2.368604
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787883
throw (click) 5953 4624 5 53 0 0% 0 0 1.723664

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.