Ruby Benchmarks

Details for Benchmarks at 2026-07-22 00:53:33 UTC

YJIT metrics from the ruby-bench suite using Ruby 5096c98623.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.0% faster than CRuby 4.1.0dev
  • 5.3% faster than YJIT 3.4.7
On railsbench it is
  • 110.5% faster than CRuby 4.1.0dev
  • 13.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 9 minutes
aarch64 runtime: 7 hours, 53 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 98 50 192 50 212
chunky-png 5 32 5 30 50 34 50 25
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 426 5 443 50 618 50 660
liquid-compile 5 404 5 514 50 544 50 824
liquid-il 5 66 5 68 50 116 50 124
liquid-render 5 172 5 172 50 429 50 457
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 254 50 290
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 156 50 247 50 238
ruby-lsp 5 164 5 161 50 237 50 225
sequel 5 429 5 465 50 598 50 657
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 17
addressable-getters 5 165 5 171 50 183 50 208
addressable-join 5 75 5 85 50 66 50 79
addressable-merge 5 161 5 160 50 223 50 229
addressable-new 5 353 5 349 50 521 50 518
addressable-normalize 5 53 5 58 50 60 50 68
addressable-parse 5 104 5 106 50 104 50 117
addressable-setters 5 185 5 184 50 234 50 249
addressable-to-s 5 163 5 170 50 182 50 207
binarytrees 5 82 5 88 50 136 50 166
blurhash 5 84 5 85 50 145 50 144
erubi 5 141 5 154 50 129 50 158
etanni 5 99 5 82 50 72 50 49
fannkuchredux 5 55 5 57 50 101 50 108
fluentd 5 61 5 60 50 21 50 29
gcbench 5 10 5 10 50 10 50 10
graphql 5 374 5 455 50 569 50 887
graphql-native 5 57 5 85 50 21 50 58
knucleotide 5 163 5 149 50 118 50 102
lee 5 23 5 32 50 10 50 20
matmul 5 53 5 52 50 88 50 97
nbody 5 250 5 252 50 662 50 691
nqueens 5 119 5 128 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 178 50 697 50 685
protoboeuf-encode 5 194 5 196 50 798 50 795
rack 5 440 5 454 50 711 50 741
ruby-json 5 83 5 112 50 50 50 90
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 207 50 250 50 238
string_malloc_pressure 5 145 5 35 50 100 50 10
sudoku 5 48 5 49 50 155 50 161
tinygql 5 42 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 39 50 455 50 454
attr_accessor 5 157 5 182 50 1831 50 1891
cfunc_itself 5 345 5 318 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 210 5 319 50 2306 50 2429
getivar-module 5 103 5 147 50 88 50 118
keyword_args 5 102 5 92 50 1239 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 267 5 480 50 296 50 1525
object-new-initialize 5 169 5 257 50 259 50 525
object-new-no-escape 5 81 5 141 50 89 50 367
respond_to 5 139 5 123 50 3904 50 3897
ruby-xor 5 247 5 237 50 1305 50 1301
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 103 50 308 50 286
send_rubyfunc_block 5 196 5 211 50 1371 50 1375
send_rubyfunc_inline 5 30 5 35 50 297 50 298
setivar 5 359 5 349 50 4929 50 4923
setivar_object 5 341 5 271 50 764 50 725
setivar_young 5 341 5 271 50 808 50 738
str_concat 5 390 5 433 50 1199 50 1066
structaref 5 153 5 199 50 1801 50 1896
structaset 5 198 5 239 50 369 50 492
throw 5 1109 5 1328 50 1440 50 1674

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) 1563695 1339060 204 2680 0 0% 0 0 73.451692
chunky-png (click) 322016 290566 79 1372 1 0% 0 0 39.317788
erubi-rails (click) 1381728 1198887 268 3630 23 0% 0 0 94.278627
hexapdf (click) 1524584 1338969 594 15686 45 0% 0 0 424.501383
liquid-c (click) 557355 481617 114 2226 5 0% 0 0 58.8532
liquid-compile (click) 476419 387956 146 2679 2 0% 0 0 72.353929
liquid-il (click) 613829 575822 70 2716 0 0% 0 0 79.031445
liquid-render (click) 667344 609979 131 2945 8 0% 0 0 76.857215
lobsters (click) 8528393 7212705 3125 63069 125 0% 0 0 2028.235634
mail (click) 865420 796790 345 7654 40 0% 0 0 205.155189
psych-load (click) 281815 277391 60 820 2 0% 0 0 22.714684
railsbench (click) 3357926 2790763 1591 19737 105 0% 0 0 533.771966
rubocop (click) 5765062 4977005 3001 57028 132 0% 6 0 1634.741044
ruby-lsp (click) 1043312 938919 408 7425 47 0% 1 0 198.555647
sequel (click) 521927 464034 11 119 0 0% 0 0 3.733732
shipit (click) 6889060 5915075 3137 49943 147 0% 0 0 1619.047739
addressable-equality (click) 313518 255495 44 1381 1 0% 0 0 32.713624
addressable-getters (click) 283519 235767 26 863 0 0% 0 0 20.367083
addressable-join (click) 289011 244352 24 941 0 0% 0 0 22.706717
addressable-merge (click) 289037 238747 27 896 0 0% 0 0 21.450118
addressable-new (click) 263873 219842 21 563 0 0% 0 0 13.62112
addressable-normalize (click) 318594 238690 43 1327 1 0% 0 0 31.856414
addressable-parse (click) 284200 243211 26 880 0 0% 0 0 20.785532
addressable-setters (click) 264068 197547 20 582 0 0% 0 0 14.029048
addressable-to-s (click) 283127 210145 26 849 0 0% 0 0 20.101527
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.733932
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.802778
erubi (click) 249298 232955 6 134 0 0% 0 0 3.820879
etanni (click) 32752 34339 8 114 0 0% 0 0 3.429306
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.785837
fluentd (click) 514445 469210 7 116 0 0% 0 0 3.583978
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.528667
graphql (click) 396163 351353 74 1939 17 0% 0 0 52.477098
graphql-native (click) 357953 306932 39 532 0 0% 0 0 13.832698
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.748963
lee (click) 317591 287076 50 1101 0 0% 0 0 30.325413
matmul (click) 11103 4709 8 136 0 0% 0 0 4.072406
nbody (click) 14448 21176 6 251 0 0% 0 0 6.075157
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.205754
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.338859
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.472566
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.613412
rack (click) 284749 246183 35 581 0 0% 0 0 14.493253
ruby-json (click) 19789 17789 8 206 0 0% 0 0 5.6763
rubyboy (click) 708955 651378 154 6871 42 0% 0 0 164.05241
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.567791
splay (click) 34682 14303 9 175 0 0% 0 0 5.348606
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.710385
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.930217
tinygql (click) 300497 264749 59 1024 5 0% 0 0 26.105282
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1869.458585
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 473.920991
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.068128
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.510252
fib (click) 2659 2995 3 30 0 0% 0 0 1.137528
getivar (click) 3789 6778 3 79 0 0% 0 0 1.933561
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.3038
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.790877
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.901615
object-new (click) 2406 2818 2 36 0 0% 0 0 0.990195
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.288269
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.713386
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.150165
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.805844
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.794869
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.305289
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.771104
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.059139
setivar (click) 2783 3726 3 46 0 0% 0 0 1.257377
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.40389
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.748716
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.475945
structaref (click) 4407 9095 3 88 0 0% 0 0 2.318374
structaset (click) 4113 5834 3 70 0 0% 0 0 1.793269
throw (click) 5953 4624 5 53 0 0% 0 0 1.780325

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.