Ruby Benchmarks

Details for Benchmarks at 2026-06-18 01:28:50 UTC

YJIT metrics from the ruby-bench suite using Ruby 4fa03be87a.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.7% faster than CRuby 4.1.0dev
  • 9.3% faster than YJIT 3.4.7
On railsbench it is
  • 119.2% faster than CRuby 4.1.0dev
  • 16.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 59 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 197 50 213
chunky-png 5 32 5 30 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 443 50 630 50 681
liquid-compile 5 421 5 519 50 579 50 846
liquid-render 5 172 5 172 50 431 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 253 50 309
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 246 50 250
ruby-lsp 5 153 5 162 50 221 50 229
sequel 5 429 5 456 50 599 50 653
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 173 50 183 50 214
addressable-join 5 74 5 83 50 65 50 85
addressable-merge 5 161 5 156 50 223 50 249
addressable-new 5 354 5 348 50 519 50 557
addressable-normalize 5 53 5 59 50 60 50 71
addressable-parse 5 104 5 108 50 102 50 121
addressable-setters 5 185 5 188 50 232 50 260
addressable-to-s 5 165 5 171 50 182 50 211
binarytrees 5 82 5 87 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 140 5 150 50 139 50 155
etanni 5 100 5 79 50 71 50 46
fannkuchredux 5 55 5 57 50 100 50 106
fluentd 5 70 5 66 50 20 50 30
gcbench 5 10 5 10 50 10 50 16
graphql 5 370 5 467 50 569 50 990
graphql-native 5 59 5 88 50 21 50 68
knucleotide 5 163 5 139 50 118 50 93
lee 5 22 5 30 50 10 50 16
matmul 5 53 5 52 50 87 50 98
nbody 5 250 5 249 50 663 50 650
nqueens 5 119 5 130 50 554 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 697 50 818
protoboeuf-encode 5 200 5 200 50 802 50 792
rack 5 438 5 473 50 713 50 807
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 10
splay 5 208 5 201 50 250 50 232
sudoku 5 48 5 50 50 155 50 168
tinygql 5 41 5 43 50 39 50 56
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 458 50 450
attr_accessor 5 157 5 172 50 1833 50 1871
cfunc_itself 5 348 5 315 50 1255 50 1258
fib 5 125 5 139 50 939 50 939
getivar 5 216 5 361 50 2307 50 2454
getivar-module 5 103 5 141 50 88 50 286
keyword_args 5 102 5 104 50 1240 50 1245
loops-times 5 23 5 27 50 63 50 63
object-new 5 268 5 479 50 297 50 1449
object-new-initialize 5 168 5 236 50 259 50 988
object-new-no-escape 5 80 5 138 50 89 50 502
respond_to 5 139 5 124 50 3896 50 3899
ruby-xor 5 247 5 238 50 1306 50 1305
send_bmethod 5 118 5 110 50 5539 50 4526
send_cfunc_block 5 106 5 107 50 305 50 291
send_rubyfunc_block 5 196 5 198 50 1372 50 1375
setivar 5 359 5 402 50 4929 50 4980
setivar_object 5 342 5 316 50 765 50 661
setivar_young 5 341 5 315 50 809 50 685
str_concat 5 390 5 437 50 1199 50 1042
structaref 5 153 5 180 50 1802 50 1862
structaset 5 198 5 224 50 370 50 485
throw 5 1108 5 1372 50 1440 50 1782

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) 1564775 1312041 204 2663 0 0% 0 0 73.900604
chunky-png (click) 325389 274948 79 1376 1 0% 0 0 38.13879
erubi-rails (click) 1389155 1201727 268 3626 23 0% 0 0 93.119369
hexapdf (click) 1532774 1319742 593 15768 44 0% 0 0 424.937224
liquid-c (click) 567735 455014 114 2240 5 0% 0 0 58.559923
liquid-compile (click) 482781 390462 146 2669 2 0% 0 0 73.18836
liquid-render (click) 674097 578408 131 2963 8 0% 0 0 77.524241
lobsters (click) 8564283 7171957 3123 63432 122 0% 0 0 2015.331366
mail (click) 877362 803546 345 7738 40 0% 0 0 208.769242
psych-load (click) 292707 277326 61 829 2 0% 0 0 23.416015
railsbench (click) 3362653 2791088 1592 19741 105 0% 0 0 568.305847
rubocop (click) 5809928 5126768 3002 57381 127 0% 6 0 1737.2619
ruby-lsp (click) 1053628 942181 409 7470 47 0% 1 0 200.640544
sequel (click) 511413 471646 11 119 0 0% 0 0 4.377259
shipit (click) 7234205 6187606 3170 51610 154 0% 0 0 1671.224696
addressable-equality (click) 325512 292953 44 1380 1 0% 0 0 33.15733
addressable-getters (click) 285565 260243 26 863 0 0% 0 0 20.304881
addressable-join (click) 291218 252600 24 941 0 0% 0 0 23.142405
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.352778
addressable-new (click) 266085 244459 21 563 0 0% 0 0 13.605951
addressable-normalize (click) 320640 295934 43 1327 1 0% 0 0 31.513941
addressable-parse (click) 270537 256711 26 880 0 0% 0 0 20.773202
addressable-setters (click) 266275 230371 20 582 0 0% 0 0 14.006009
addressable-to-s (click) 285452 234869 26 849 0 0% 0 0 20.086405
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.751903
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.836085
erubi (click) 252242 241817 6 134 0 0% 0 0 3.847005
etanni (click) 32989 26478 8 114 0 0% 0 0 3.413868
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.770465
fluentd (click) 518702 429439 7 116 0 0% 0 0 3.675161
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.403946
graphql (click) 418351 373967 74 1940 19 0% 0 0 52.868153
graphql-native (click) 358711 294993 39 532 0 0% 0 0 13.541199
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.745454
lee (click) 322111 282111 50 1102 0 0% 0 0 30.514614
matmul (click) 11103 4709 8 136 0 0% 0 0 4.058365
nbody (click) 14448 21176 6 251 0 0% 0 0 6.116872
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.210478
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.115624
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.428184
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.016423
rack (click) 288557 272607 35 581 0 0% 0 0 14.404836
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.734305
rubyboy (click) 708298 633464 154 6871 42 0% 0 0 162.532765
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.528966
splay (click) 34617 22483 9 175 0 0% 0 0 5.238796
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.775363
tinygql (click) 304386 282723 59 1026 5 0% 0 0 26.255166
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1861.044252
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.447574
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.105157
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.504476
fib (click) 2659 2995 3 30 0 0% 0 0 1.093549
getivar (click) 3789 6778 3 79 0 0% 0 0 1.912697
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.298612
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.792967
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.909165
object-new (click) 2406 2818 2 36 0 0% 0 0 0.993613
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.2726
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.72244
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.097459
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.786112
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.779135
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.275698
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.755403
setivar (click) 2783 3726 3 46 0 0% 0 0 1.257671
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.396739
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.697769
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.478803
structaref (click) 4407 9095 3 88 0 0% 0 0 2.316329
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787081
throw (click) 5953 4624 5 53 0 0% 0 0 1.749647

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.