Ruby Benchmarks

Details for Benchmarks at 2026-07-07 01:05:08 UTC

YJIT metrics from the ruby-bench suite using Ruby db7a9a1d6d.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.9% faster than CRuby 4.1.0dev
  • 9.0% faster than YJIT 3.4.7
On railsbench it is
  • 112.6% faster than CRuby 4.1.0dev
  • 14.8% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 minutes
aarch64 runtime: 7 hours, 50 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 89 5 97 50 199 50 233
chunky-png 5 32 5 31 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 423 5 443 50 621 50 674
liquid-compile 5 421 5 513 50 579 50 835
liquid-render 5 172 5 175 50 431 50 463
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 205 50 253 50 301
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 246 50 243
ruby-lsp 5 162 5 163 50 222 50 229
sequel 5 421 5 465 50 595 50 664
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 17
addressable-getters 5 165 5 171 50 183 50 207
addressable-join 5 74 5 84 50 65 50 83
addressable-merge 5 160 5 162 50 223 50 240
addressable-new 5 351 5 353 50 521 50 537
addressable-normalize 5 53 5 57 50 60 50 69
addressable-parse 5 104 5 107 50 103 50 117
addressable-setters 5 185 5 186 50 232 50 250
addressable-to-s 5 164 5 172 50 182 50 206
binarytrees 5 82 5 86 50 136 50 159
blurhash 5 84 5 85 50 145 50 145
erubi 5 138 5 146 50 137 50 151
etanni 5 100 5 78 50 72 50 46
fannkuchredux 5 55 5 56 50 101 50 102
fluentd 5 62 5 59 50 21 50 24
gcbench 5 10 5 10 50 10 50 17
graphql 5 372 5 471 50 569 50 945
graphql-native 5 57 5 91 50 21 50 55
knucleotide 5 163 5 145 50 117 50 99
lee 5 23 5 29 50 10 50 15
matmul 5 53 5 53 50 87 50 94
nbody 5 250 5 250 50 663 50 675
nqueens 5 119 5 127 50 554 50 569
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 187 50 698 50 800
protoboeuf-encode 5 200 5 194 50 797 50 782
rack 5 448 5 480 50 713 50 778
ruby-json 5 84 5 113 50 50 50 90
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
splay 5 209 5 204 50 250 50 244
string_malloc_pressure 5 145 5 34 50 101 50 10
sudoku 5 48 5 49 50 155 50 158
tinygql 5 42 5 43 50 36 50 54
30k_ifelse 5 28 5 28 50 172 50 184
30k_methods 5 38 5 38 50 453 50 458
attr_accessor 5 156 5 171 50 1832 50 1874
cfunc_itself 5 348 5 309 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 210 5 339 50 2305 50 2441
getivar-module 5 103 5 145 50 89 50 280
keyword_args 5 102 5 101 50 1240 50 1245
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 472 50 297 50 1442
object-new-initialize 5 168 5 270 50 259 50 965
object-new-no-escape 5 80 5 143 50 89 50 515
respond_to 5 139 5 121 50 3906 50 3899
ruby-xor 5 247 5 239 50 1305 50 1312
send_bmethod 5 118 5 109 50 5539 50 4526
send_cfunc_block 5 107 5 104 50 305 50 301
send_rubyfunc_block 5 196 5 196 50 1372 50 1375
setivar 5 359 5 431 50 4930 50 5004
setivar_object 5 341 5 312 50 762 50 656
setivar_young 5 342 5 311 50 807 50 681
str_concat 5 390 5 430 50 1205 50 1053
structaref 5 153 5 180 50 1799 50 1862
structaset 5 198 5 212 50 369 50 484
throw 5 1108 5 1336 50 1441 50 1719

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) 1564878 1255517 204 2662 0 0% 0 0 72.683711
chunky-png (click) 325662 300402 79 1376 1 0% 0 0 37.657285
erubi-rails (click) 1387279 1159672 268 3626 23 0% 0 0 93.511016
hexapdf (click) 1535187 1355712 593 15769 44 0% 0 0 424.932112
liquid-c (click) 568228 497109 114 2240 5 0% 0 0 58.509999
liquid-compile (click) 479111 435787 146 2673 2 0% 0 0 74.048823
liquid-render (click) 674590 669675 131 2963 8 0% 0 0 77.665284
lobsters (click) 8577305 7085886 3128 63585 125 0% 0 0 2021.03313
mail (click) 875054 859632 345 7739 40 0% 0 0 207.458916
psych-load (click) 292535 237088 60 829 2 0% 0 0 23.405564
railsbench (click) 3357559 2893233 1592 19741 105 0% 0 0 531.956103
rubocop (click) 5804735 5041421 3001 57359 130 0% 6 0 1642.893943
ruby-lsp (click) 1053523 983754 409 7470 47 0% 1 0 201.680718
sequel (click) 511899 431806 11 119 0 0% 0 0 4.067561
shipit (click) 6884169 5934760 3134 49967 147 0% 0 0 1590.857295
addressable-equality (click) 325723 285611 44 1381 1 0% 0 0 33.092428
addressable-getters (click) 286001 244888 26 863 0 0% 0 0 20.157831
addressable-join (click) 287432 264958 24 941 0 0% 0 0 22.376141
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.360245
addressable-new (click) 266360 220776 21 563 0 0% 0 0 13.424185
addressable-normalize (click) 321076 280579 43 1327 1 0% 0 0 31.686185
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 20.934073
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 14.121222
addressable-to-s (click) 285609 252034 26 849 0 0% 0 0 19.83029
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.765521
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.840206
erubi (click) 248747 221743 6 134 0 0% 0 0 3.890623
etanni (click) 32989 26478 8 114 0 0% 0 0 3.396613
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.777496
fluentd (click) 517059 420317 7 116 0 0% 0 0 3.646584
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.389078
graphql (click) 418574 374791 74 1940 19 0% 0 0 52.614033
graphql-native (click) 361839 307630 39 532 0 0% 0 0 13.705287
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.605222
lee (click) 322871 291574 50 1102 0 0% 0 0 30.831551
matmul (click) 11103 4709 8 136 0 0% 0 0 4.091272
nbody (click) 14448 21176 6 251 0 0% 0 0 6.109058
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.269723
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.8018
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.468011
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.944813
rack (click) 288825 248936 35 581 0 0% 0 0 14.416476
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.688024
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 163.508045
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.561339
splay (click) 34617 22483 9 175 0 0% 0 0 5.452017
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.742614
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.856134
tinygql (click) 301071 271091 59 1026 5 0% 0 0 26.237675
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.655477
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.006712
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.080671
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.500499
fib (click) 2659 2995 3 30 0 0% 0 0 1.110466
getivar (click) 3789 6778 3 79 0 0% 0 0 1.918513
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.345865
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.80656
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.878092
object-new (click) 2406 2818 2 36 0 0% 0 0 0.983733
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.273332
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.743197
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.139328
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.760981
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.779895
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.286131
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.762394
setivar (click) 2783 3726 3 46 0 0% 0 0 1.255019
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.405074
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.72182
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.498151
structaref (click) 4407 9095 3 88 0 0% 0 0 2.297147
structaset (click) 4113 5834 3 70 0 0% 0 0 1.797867
throw (click) 5953 4624 5 53 0 0% 0 0 1.746933

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.