Ruby Benchmarks

Details for Benchmarks at 2026-04-26 01:08:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 97c070c244.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.2% faster than CRuby 4.1.0dev
  • 8.4% faster than YJIT 3.4.7
On railsbench it is
  • 115.4% faster than CRuby 4.1.0dev
  • 13.9% 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 95 50 198 50 239
chunky-png 5 31 5 30 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 616 50 659
liquid-compile 5 417 5 475 50 542 50 738
liquid-render 5 168 5 172 50 432 50 459
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 199 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 154 5 152 50 247 50 253
ruby-lsp 5 158 5 159 50 238 50 231
sequel 5 427 5 439 50 597 50 630
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 164 50 183 50 195
addressable-join 5 74 5 79 50 64 50 72
addressable-merge 5 161 5 151 50 223 50 220
addressable-new 5 350 5 339 50 516 50 511
addressable-normalize 5 52 5 53 50 60 50 59
addressable-parse 5 103 5 102 50 103 50 110
addressable-setters 5 185 5 177 50 231 50 236
addressable-to-s 5 164 5 164 50 181 50 195
binarytrees 5 82 5 85 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 136 5 146 50 133 50 149
etanni 5 100 5 77 50 72 50 44
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 56 5 59 50 22 50 27
gcbench 5 10 5 10 50 10 50 15
graphql 5 373 5 439 50 569 50 949
graphql-native 5 59 5 88 50 22 50 69
knucleotide 5 163 5 145 50 117 50 98
lee 5 23 5 29 50 10 50 12
matmul 5 53 5 56 50 87 50 98
nbody 5 250 5 275 50 663 50 706
nqueens 5 119 5 121 50 554 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 698 50 788
protoboeuf-encode 5 200 5 193 50 805 50 837
rack 5 442 5 449 50 711 50 723
ruby-json 5 84 5 104 50 50 50 84
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 224 50 250 50 283
sudoku 5 48 5 49 50 155 50 158
tinygql 5 40 5 39 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 457 50 454
attr_accessor 5 157 5 176 50 1834 50 1883
cfunc_itself 5 345 5 326 50 1255 50 1259
fib 5 125 5 134 50 939 50 939
getivar 5 215 5 297 50 2313 50 2410
getivar-module 5 103 5 135 50 89 50 267
keyword_args 5 102 5 100 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 471 50 297 50 1516
object-new-initialize 5 169 5 251 50 260 50 1023
object-new-no-escape 5 80 5 134 50 89 50 517
respond_to 5 139 5 129 50 3895 50 3903
ruby-xor 5 247 5 232 50 1305 50 1294
send_bmethod 5 118 5 116 50 5538 50 4526
send_cfunc_block 5 106 5 107 50 305 50 331
send_rubyfunc_block 5 196 5 203 50 1372 50 1376
setivar 5 360 5 480 50 4930 50 5042
setivar_object 5 341 5 346 50 763 50 653
setivar_young 5 341 5 332 50 809 50 691
str_concat 5 390 5 384 50 1201 50 1175
structaref 5 153 5 174 50 1799 50 1848
structaset 5 198 5 203 50 370 50 470
throw 5 1108 5 1403 50 1443 50 1896

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) 1562023 1331143 203 2669 0 0% 0 0 73.337556
chunky-png (click) 306780 284907 79 1376 1 0% 0 0 38.134486
erubi-rails (click) 1385272 1220999 268 3638 23 0% 0 0 93.575686
hexapdf (click) 1524495 1291190 593 15783 44 0% 0 0 426.012233
liquid-c (click) 566018 436042 114 2240 5 0% 0 0 58.901205
liquid-compile (click) 475328 469613 146 2736 2 0% 0 0 83.806199
liquid-render (click) 654250 594687 131 2963 8 0% 0 0 77.316736
lobsters (click) 8585827 7293204 3126 63745 122 0% 0 0 2027.956147
mail (click) 876168 834368 345 7738 40 0% 0 0 207.42379
psych-load (click) 292463 235940 61 829 2 0% 0 0 23.475761
railsbench (click) 3358545 2833091 1592 19759 104 0% 0 0 532.644441
rubocop (click) 5787698 4985339 3002 57173 127 0% 6 0 1639.313604
ruby-lsp (click) 1047210 892210 409 7472 47 0% 1 0 198.080211
sequel (click) 506735 457497 11 121 0 0% 0 0 5.175659
shipit (click) 7220841 5968039 3118 50281 148 0% 0 0 1588.487683
addressable-equality (click) 320188 294836 44 1380 1 0% 0 0 35.188824
addressable-getters (click) 281050 254732 26 869 0 0% 0 0 22.355337
addressable-join (click) 285496 213299 24 945 0 0% 0 0 25.447956
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 24.972167
addressable-new (click) 260519 221768 21 569 0 0% 0 0 14.399111
addressable-normalize (click) 316840 291825 43 1327 1 0% 0 0 34.223994
addressable-parse (click) 273327 218798 26 880 0 0% 0 0 22.496774
addressable-setters (click) 242937 170189 20 582 0 0% 0 0 15.849033
addressable-to-s (click) 276421 232238 26 849 0 0% 0 0 21.339417
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.740159
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.847495
erubi (click) 251950 200403 6 134 0 0% 0 0 3.881757
etanni (click) 32989 26478 8 114 0 0% 0 0 3.397618
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.834099
fluentd (click) 489292 427389 7 116 0 0% 0 0 3.623407
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.604606
graphql (click) 403712 371556 73 1931 19 0% 0 0 52.470822
graphql-native (click) 356255 324731 39 532 0 0% 0 0 13.583166
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.721449
lee (click) 320047 270685 49 1099 0 0% 0 0 30.607502
matmul (click) 11103 4709 8 136 0 0% 0 0 4.112256
nbody (click) 14448 21176 6 251 0 0% 0 0 6.100828
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.170932
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.318274
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.423744
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.133912
rack (click) 268744 240245 35 581 0 0% 0 0 15.504022
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.699304
rubyboy (click) 706947 672392 154 6873 42 0% 0 0 162.58574
rubykon (click) 148777 155950 138 2107 4 0% 0 0 54.855262
splay (click) 34953 22682 9 175 0 0% 0 0 5.225475
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.841339
tinygql (click) 304373 274325 59 1026 5 0% 0 0 26.562531
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1858.317623
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.887933
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.0732
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.535444
fib (click) 2659 2995 3 30 0 0% 0 0 1.144597
getivar (click) 3789 6778 3 79 0 0% 0 0 1.906104
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.349584
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.8091
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.899225
object-new (click) 2406 2818 2 36 0 0% 0 0 0.983446
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.294553
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.980103
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.146589
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.791766
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.813678
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.288438
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.766864
setivar (click) 2783 3726 3 46 0 0% 0 0 1.231466
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.423286
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.703979
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.413911
structaref (click) 4407 9095 3 88 0 0% 0 0 2.351794
structaset (click) 4113 5834 3 70 0 0% 0 0 1.807592
throw (click) 5953 4624 5 53 0 0% 0 0 1.749261

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.