Ruby Benchmarks

Details for Benchmarks at 2026-04-13 01:04:38 UTC

YJIT metrics from the ruby-bench suite using Ruby 6593cc52d6.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.3% faster than CRuby 4.1.0dev
  • 8.4% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 48 minutes
aarch64 runtime: 7 hours, 40 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 193 50 243
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 420 5 438 50 620 50 660
liquid-compile 5 421 5 478 50 580 50 755
liquid-render 5 172 5 172 50 433 50 452
mail 5 194 5 200 50 254 50 285
psych-load 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 248 50 241
ruby-lsp 5 157 5 165 50 240 50 236
sequel 5 426 5 450 50 589 50 630
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 12
addressable-getters 5 165 5 167 50 183 50 198
addressable-join 5 74 5 79 50 66 50 74
addressable-merge 5 161 5 153 50 223 50 222
addressable-new 5 353 5 342 50 521 50 526
addressable-normalize 5 53 5 54 50 60 50 59
addressable-parse 5 104 5 103 50 104 50 111
addressable-setters 5 186 5 177 50 233 50 228
addressable-to-s 5 165 5 167 50 182 50 198
binarytrees 5 81 5 85 50 136 50 143
blurhash 5 84 5 84 50 145 50 145
erubi 5 133 5 154 50 139 50 159
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 57 50 101 50 102
fluentd 5 58 5 60 50 21 50 23
gcbench 5 10 5 10 50 10 50 15
graphql 5 372 5 447 50 564 50 945
graphql-native 5 57 5 88 50 21 50 69
knucleotide 5 163 5 144 50 118 50 98
lee 5 23 5 29 50 10 50 15
matmul 5 53 5 57 50 88 50 96
nbody 5 250 5 283 50 663 50 703
nqueens 5 119 5 119 50 554 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 697 50 791
protoboeuf-encode 5 198 5 195 50 800 50 780
rack 5 443 5 437 50 714 50 725
ruby-json 5 84 5 105 50 50 50 81
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 223 50 250 50 280
sudoku 5 48 5 49 50 155 50 159
tinygql 5 41 5 42 50 40 50 53
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 458 50 457
attr_accessor 5 157 5 186 50 1833 50 1899
cfunc_itself 5 348 5 325 50 1255 50 1258
fib 5 125 5 131 50 939 50 939
getivar 5 216 5 301 50 2313 50 2411
getivar-module 5 103 5 136 50 89 50 249
keyword_args 5 102 5 105 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 463 50 292 50 1513
object-new-initialize 5 169 5 252 50 259 50 1020
object-new-no-escape 5 81 5 133 50 89 50 517
respond_to 5 139 5 130 50 3901 50 3895
ruby-xor 5 247 5 233 50 1305 50 1310
send_bmethod 5 118 5 116 50 5539 50 4525
send_cfunc_block 5 107 5 107 50 304 50 305
send_rubyfunc_block 5 196 5 209 50 1372 50 1371
setivar 5 359 5 474 50 4930 50 5039
setivar_object 5 341 5 352 50 764 50 663
setivar_young 5 341 5 352 50 809 50 692
str_concat 5 389 5 449 50 1205 50 1171
structaref 5 153 5 190 50 1801 50 1874
structaset 5 198 5 231 50 369 50 478
throw 5 1109 5 1392 50 1441 50 1770

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) 1562736 1284183 203 2673 0 0% 0 0 74.62315
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.375783
erubi-rails (click) 1380560 1288736 268 3626 23 0% 0 0 100.408419
hexapdf (click) 1535414 1363301 593 15785 44 0% 0 0 430.981008
liquid-c (click) 566018 436042 114 2240 5 0% 0 0 59.350081
liquid-compile (click) 484709 440885 146 2733 2 0% 0 0 84.037415
liquid-render (click) 671262 615084 131 2963 8 0% 0 0 78.073683
mail (click) 875107 857142 345 7738 40 0% 0 0 210.527731
psych-load (click) 292898 252665 61 833 2 0% 0 0 24.03243
rubocop (click) 5790757 5110913 3002 57195 128 0% 6 0 1651.469893
ruby-lsp (click) 1047037 932994 409 7472 47 0% 1 0 200.673382
sequel (click) 507818 483618 11 121 0 0% 0 0 5.206673
shipit (click) 7228783 6097260 3118 50311 148 0% 0 0 1608.843228
addressable-equality (click) 322789 248562 44 1415 1 0% 0 0 35.954237
addressable-getters (click) 280037 262044 26 863 0 0% 0 0 22.41299
addressable-join (click) 287506 240390 24 945 0 0% 0 0 26.102095
addressable-merge (click) 287215 259131 27 900 0 0% 0 0 24.888865
addressable-new (click) 262184 256765 21 569 0 0% 0 0 14.476517
addressable-normalize (click) 317591 292818 43 1343 1 0% 0 0 33.966251
addressable-parse (click) 285005 258554 26 886 0 0% 0 0 23.405011
addressable-setters (click) 260951 215870 20 582 0 0% 0 0 16.260733
addressable-to-s (click) 279711 261011 26 853 0 0% 0 0 21.137634
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.800047
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.018603
erubi (click) 251950 200403 6 134 0 0% 0 0 3.873506
etanni (click) 32989 26478 8 114 0 0% 0 0 3.46554
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.827043
fluentd (click) 491827 455804 7 116 0 0% 0 0 3.635951
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.577275
graphql (click) 414863 369827 73 1931 19 0% 0 0 52.80594
graphql-native (click) 358270 319054 39 532 0 0% 0 0 13.783642
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.715411
lee (click) 321778 272972 49 1099 0 0% 0 0 30.415692
matmul (click) 11103 4709 8 136 0 0% 0 0 4.125072
nbody (click) 14448 21176 6 251 0 0% 0 0 6.167004
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.262956
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 107.037903
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.579217
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.648184
rack (click) 288238 272785 35 628 0 0% 0 0 16.822829
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.755216
rubyboy (click) 709116 601431 154 6877 42 0% 0 0 164.713405
rubykon (click) 148271 147165 138 2099 4 0% 0 0 55.364124
splay (click) 34953 22682 9 175 0 0% 0 0 5.265901
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.00341
tinygql (click) 304902 274818 59 1032 5 0% 0 0 26.929859
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1868.342907
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.059625
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.054418
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.528456
fib (click) 2659 2995 3 30 0 0% 0 0 1.09117
getivar (click) 3789 6778 3 79 0 0% 0 0 1.938742
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.356143
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.827403
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.899879
object-new (click) 2406 2818 2 36 0 0% 0 0 0.989939
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.265891
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.974446
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.202909
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.806745
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.794889
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.297022
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.740065
setivar (click) 2783 3726 3 46 0 0% 0 0 1.262913
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.415654
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.723779
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.446575
structaref (click) 4407 9095 3 88 0 0% 0 0 2.356218
structaset (click) 4113 5834 3 70 0 0% 0 0 1.811305
throw (click) 5953 4624 5 53 0 0% 0 0 1.755449

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.