Ruby Benchmarks

Details for Benchmarks at 2026-06-06 01:19:04 UTC

YJIT metrics from the ruby-bench suite using Ruby 08efe07a7b.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 102.6% faster than CRuby 4.1.0dev
  • 12.0% faster than YJIT 3.4.7
On railsbench it is
  • 122.4% faster than CRuby 4.1.0dev
  • 18.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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 97 50 200 50 242
chunky-png 5 32 5 30 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 424 5 444 50 625 50 687
liquid-compile 5 417 5 520 50 552 50 870
liquid-render 5 171 5 174 50 430 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 207 50 254 50 313
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 248 50 257
ruby-lsp 5 154 5 164 50 222 50 238
sequel 5 422 5 451 50 602 50 662
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 19
addressable-getters 5 165 5 174 50 183 50 216
addressable-join 5 74 5 85 50 65 50 86
addressable-merge 5 162 5 160 50 222 50 252
addressable-new 5 354 5 351 50 515 50 551
addressable-normalize 5 53 5 58 50 60 50 73
addressable-parse 5 104 5 108 50 104 50 124
addressable-setters 5 184 5 187 50 234 50 262
addressable-to-s 5 164 5 173 50 181 50 216
binarytrees 5 82 5 83 50 136 50 150
blurhash 5 84 5 83 50 145 50 144
erubi 5 136 5 145 50 142 50 146
etanni 5 100 5 77 50 72 50 44
fannkuchredux 5 55 5 57 50 100 50 107
fluentd 5 55 5 62 50 21 50 27
gcbench 5 10 5 10 50 10 50 18
graphql 5 370 5 460 50 533 50 987
graphql-native 5 58 5 91 50 22 50 76
knucleotide 5 163 5 144 50 118 50 98
lee 5 23 5 31 50 10 50 18
matmul 5 53 5 52 50 87 50 98
nbody 5 250 5 249 50 663 50 630
nqueens 5 119 5 122 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 697 50 815
protoboeuf-encode 5 200 5 195 50 807 50 817
rack 5 435 5 469 50 721 50 812
ruby-json 5 84 5 116 50 50 50 96
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 272
sudoku 5 48 5 50 50 155 50 169
tinygql 5 41 5 43 50 35 50 58
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 457 50 459
attr_accessor 5 157 5 187 50 1833 50 1900
cfunc_itself 5 348 5 317 50 1255 50 1258
fib 5 125 5 132 50 939 50 939
getivar 5 216 5 308 50 2306 50 2424
getivar-module 5 103 5 134 50 89 50 280
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 466 50 296 50 1529
object-new-initialize 5 168 5 234 50 259 50 1033
object-new-no-escape 5 80 5 136 50 89 50 522
respond_to 5 139 5 125 50 3896 50 3898
ruby-xor 5 247 5 222 50 1305 50 1306
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 107 5 104 50 304 50 281
send_rubyfunc_block 5 196 5 199 50 1372 50 1375
setivar 5 359 5 391 50 4929 50 4969
setivar_object 5 341 5 291 50 765 50 592
setivar_young 5 341 5 292 50 810 50 607
str_concat 5 391 5 447 50 1203 50 1094
structaref 5 153 5 184 50 1798 50 1869
structaset 5 198 5 216 50 369 50 481
throw 5 1107 5 1301 50 1444 50 1681

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) 1562257 1357645 203 2659 0 0% 0 0 73.14353
chunky-png (click) 325387 274948 79 1376 1 0% 0 0 38.176378
erubi-rails (click) 1385318 1245877 268 3626 23 0% 0 0 100.4556
hexapdf (click) 1534259 1329499 594 15770 44 0% 0 0 427.501701
liquid-c (click) 566617 526742 114 2240 5 0% 0 0 58.653263
liquid-compile (click) 481571 396601 146 2669 2 0% 0 0 73.574438
liquid-render (click) 672979 560024 131 2963 8 0% 0 0 77.394285
lobsters (click) 8562535 7261047 3125 63419 122 0% 0 0 2120.477435
mail (click) 876654 835318 345 7738 40 0% 0 0 208.597795
psych-load (click) 289711 248818 61 829 2 0% 0 0 23.294016
railsbench (click) 3354290 3091172 1592 19740 105 0% 0 0 535.575739
rubocop (click) 5803577 5013836 3002 57342 128 0% 6 0 1630.485145
ruby-lsp (click) 1052487 915578 409 7470 47 0% 1 0 201.159173
sequel (click) 495601 392408 11 119 0 0% 0 0 4.119866
shipit (click) 7229671 6109030 3170 51562 154 0% 0 0 1645.523935
addressable-equality (click) 325512 276569 44 1380 1 0% 0 0 33.27845
addressable-getters (click) 285844 235915 26 863 0 0% 0 0 20.554737
addressable-join (click) 288231 224132 24 941 0 0% 0 0 22.562758
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.570957
addressable-new (click) 266080 228090 21 563 0 0% 0 0 13.758309
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.741389
addressable-parse (click) 285569 250277 26 880 0 0% 0 0 21.043167
addressable-setters (click) 266275 230371 20 582 0 0% 0 0 14.104148
addressable-to-s (click) 285452 234869 26 849 0 0% 0 0 20.247744
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.751817
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.814692
erubi (click) 252235 241817 6 134 0 0% 0 0 3.86304
etanni (click) 32989 26478 8 114 0 0% 0 0 3.436193
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.85584
fluentd (click) 515304 441933 7 116 0 0% 0 0 3.621925
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.302342
graphql (click) 417737 372977 73 1931 19 0% 0 0 52.936817
graphql-native (click) 361087 346750 39 532 0 0% 0 0 13.680785
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.648152
lee (click) 321767 297733 49 1093 0 0% 0 0 30.25114
matmul (click) 11103 4709 8 136 0 0% 0 0 4.103838
nbody (click) 14448 21176 6 251 0 0% 0 0 6.147721
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.267863
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.13233
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.596436
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.940403
rack (click) 287943 230677 35 581 0 0% 0 0 14.547353
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.834101
rubyboy (click) 708516 641776 154 6871 42 0% 0 0 163.904415
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.871621
splay (click) 34617 22483 9 175 0 0% 0 0 5.226575
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.024868
tinygql (click) 304659 282951 59 1026 5 0% 0 0 26.302427
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1864.266678
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.045823
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.092171
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.488896
fib (click) 2659 2995 3 30 0 0% 0 0 1.11088
getivar (click) 3789 6778 3 79 0 0% 0 0 1.937728
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.356683
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.802253
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.944567
object-new (click) 2406 2818 2 36 0 0% 0 0 1.00903
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.257943
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.767874
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.129941
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.809132
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.814643
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.289973
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.732272
setivar (click) 2783 3726 3 46 0 0% 0 0 1.246408
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.432132
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.74047
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.425132
structaref (click) 4407 9095 3 88 0 0% 0 0 2.351828
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787508
throw (click) 5953 4624 5 53 0 0% 0 0 1.779173

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.