Ruby Benchmarks

Details for Benchmarks at 2026-05-09 01:10:24 UTC

YJIT metrics from the ruby-bench suite using Ruby 5faeea873b.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.9% faster than CRuby 4.1.0dev
  • 8.2% faster than YJIT 3.4.7
On railsbench it is
  • 117.9% faster than CRuby 4.1.0dev
  • 16.2% 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 192 50 235
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 435 50 620 50 658
liquid-compile 5 421 5 490 50 577 50 748
liquid-render 5 173 5 173 50 429 50 460
lobsters 5 19 5 20 50 10 50 10
mail 5 193 5 201 50 253 50 289
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 247 50 257
ruby-lsp 5 163 5 161 50 239 50 231
sequel 5 428 5 450 50 598 50 637
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 164 5 167 50 182 50 195
addressable-join 5 75 5 79 50 66 50 72
addressable-merge 5 162 5 152 50 222 50 222
addressable-new 5 353 5 338 50 518 50 518
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 104 5 103 50 104 50 109
addressable-setters 5 185 5 175 50 234 50 228
addressable-to-s 5 164 5 167 50 182 50 194
binarytrees 5 82 5 86 50 136 50 171
blurhash 5 84 5 84 50 145 50 145
erubi 5 141 5 150 50 138 50 153
etanni 5 100 5 80 50 73 50 48
fannkuchredux 5 55 5 58 50 101 50 104
fluentd 5 61 5 62 50 29 50 28
gcbench 5 10 5 10 50 10 50 17
graphql 5 373 5 446 50 569 50 950
graphql-native 5 59 5 89 50 21 50 71
knucleotide 5 163 5 145 50 118 50 98
lee 5 22 5 30 50 10 50 18
matmul 5 53 5 55 50 87 50 96
nbody 5 250 5 278 50 663 50 667
nqueens 5 119 5 125 50 555 50 584
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 697 50 811
protoboeuf-encode 5 201 5 198 50 806 50 817
rack 5 441 5 444 50 713 50 730
ruby-json 5 84 5 107 50 50 50 83
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 227 50 247 50 291
sudoku 5 48 5 50 50 155 50 155
tinygql 5 41 5 42 50 35 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 457 50 446
attr_accessor 5 156 5 173 50 1834 50 1878
cfunc_itself 5 346 5 319 50 1255 50 1259
fib 5 125 5 135 50 939 50 938
getivar 5 210 5 304 50 2305 50 2412
getivar-module 5 103 5 132 50 89 50 265
keyword_args 5 102 5 101 50 1239 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 462 50 297 50 1495
object-new-initialize 5 168 5 234 50 259 50 1010
object-new-no-escape 5 81 5 134 50 89 50 496
respond_to 5 139 5 121 50 3897 50 3904
ruby-xor 5 247 5 234 50 1305 50 1293
send_bmethod 5 118 5 89 50 5539 50 4525
send_cfunc_block 5 106 5 107 50 305 50 269
send_rubyfunc_block 5 196 5 204 50 1372 50 1375
setivar 5 359 5 366 50 4931 50 4942
setivar_object 5 341 5 298 50 762 50 595
setivar_young 5 342 5 294 50 808 50 608
str_concat 5 399 5 449 50 1202 50 1164
structaref 5 153 5 145 50 1800 50 1832
structaset 5 198 5 221 50 370 50 479
throw 5 1107 5 1408 50 1442 50 1880

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) 1560010 1386877 203 2672 0 0% 0 0 77.570818
chunky-png (click) 313949 292607 79 1376 1 0% 0 0 37.974875
erubi-rails (click) 1385692 1277710 269 3664 23 0% 0 0 95.14355
hexapdf (click) 1532485 1342808 593 15796 44 0% 0 0 429.000016
liquid-c (click) 554953 487159 114 2240 5 0% 0 0 57.935831
liquid-compile (click) 487855 444808 146 2746 2 0% 0 0 82.005509
liquid-render (click) 673043 585124 131 2963 8 0% 0 0 76.959042
lobsters (click) 8572950 7141138 3126 63601 122 0% 0 0 2026.278082
mail (click) 865349 820252 345 7738 40 0% 0 0 208.379726
psych-load (click) 292848 252617 61 833 2 0% 0 0 23.671466
railsbench (click) 3359017 2940609 1592 19758 104 0% 0 0 535.076805
rubocop (click) 5789000 4995333 3002 57190 127 0% 6 0 1637.465865
ruby-lsp (click) 1047548 950178 409 7472 47 0% 1 0 197.976417
sequel (click) 508506 427091 11 119 0 0% 0 0 4.997783
shipit (click) 7203337 5999678 3119 50068 148 0% 0 0 1587.848291
addressable-equality (click) 310921 250128 44 1392 1 0% 0 0 36.589336
addressable-getters (click) 262965 217205 26 865 0 0% 0 0 21.847997
addressable-join (click) 287142 240056 24 941 0 0% 0 0 25.974456
addressable-merge (click) 287163 258993 27 896 0 0% 0 0 23.913821
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.492578
addressable-normalize (click) 316840 291825 43 1327 1 0% 0 0 33.481933
addressable-parse (click) 284480 258009 26 880 0 0% 0 0 23.076288
addressable-setters (click) 251041 203167 20 582 0 0% 0 0 15.389288
addressable-to-s (click) 281376 246901 26 849 0 0% 0 0 22.07474
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.720208
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.916564
erubi (click) 251950 200403 6 134 0 0% 0 0 3.885271
etanni (click) 32989 26478 8 114 0 0% 0 0 3.378961
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.780014
fluentd (click) 488462 410217 7 116 0 0% 0 0 3.650757
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.325953
graphql (click) 415285 370301 73 1931 19 0% 0 0 52.088818
graphql-native (click) 358645 303134 39 532 0 0% 0 0 13.60434
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.609388
lee (click) 302518 266326 49 1093 0 0% 0 0 29.758922
matmul (click) 11103 4709 8 136 0 0% 0 0 4.069462
nbody (click) 14448 21176 6 251 0 0% 0 0 6.123711
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.138483
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.524945
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.058077
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.104381
rack (click) 287658 271183 35 581 0 0% 0 0 16.151597
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.750561
rubyboy (click) 689913 611141 154 6871 42 0% 0 0 162.596403
rubykon (click) 150308 149737 138 2125 4 0% 0 0 55.44374
splay (click) 34953 22682 9 175 0 0% 0 0 5.165633
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.782964
tinygql (click) 304373 274325 59 1026 5 0% 0 0 26.215271
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1858.460034
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 471.904524
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.071441
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.50269
fib (click) 2659 2995 3 30 0 0% 0 0 1.072078
getivar (click) 3789 6778 3 79 0 0% 0 0 1.916796
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.34169
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.799844
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.912686
object-new (click) 2406 2818 2 36 0 0% 0 0 0.993684
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.260727
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.959218
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.141855
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.80573
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.763281
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.246755
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.733334
setivar (click) 2783 3726 3 46 0 0% 0 0 1.246627
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.403036
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.708962
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.426898
structaref (click) 4407 9095 3 88 0 0% 0 0 2.326655
structaset (click) 4113 5834 3 70 0 0% 0 0 1.773828
throw (click) 5953 4624 5 53 0 0% 0 0 1.757921

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.