Ruby Benchmarks

Details for Benchmarks at 2026-02-19 00:53:29 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.5% faster than CRuby 4.1.0dev
  • 6.8% faster than YJIT 3.4.7
On railsbench it is
  • 114.1% faster than CRuby 4.1.0dev
  • 11.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 24 minutes
aarch64 runtime: 7 hours, 18 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 90 5 100 50 198 50 240
chunky-png 5 32 5 32 50 33 50 27
erubi-rails 5 16 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 430 50 621 50 644
liquid-compile 5 421 5 481 50 583 50 716
liquid-render 5 170 5 177 50 432 50 448
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 198 50 253 50 267
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 246 50 250
ruby-lsp 5 160 5 164 50 224 50 234
sequel 5 426 5 435 50 600 50 629
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 13
addressable-getters 5 163 5 172 50 182 50 202
addressable-join 5 74 5 79 50 66 50 77
addressable-merge 5 159 5 160 50 222 50 224
addressable-new 5 351 5 357 50 521 50 524
addressable-normalize 5 53 5 55 50 59 50 63
addressable-parse 5 104 5 107 50 104 50 116
addressable-setters 5 185 5 190 50 229 50 241
addressable-to-s 5 163 5 173 50 182 50 206
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 128 5 146 50 135 50 144
etanni 5 99 5 73 50 71 50 38
fannkuchredux 5 55 5 56 50 102 50 103
fluentd 5 56 5 60 50 29 50 32
graphql 5 360 5 476 50 574 50 943
graphql-native 5 59 5 87 50 23 50 68
knucleotide 5 163 5 160 50 117 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 95 50 97
nbody 5 241 5 295 50 677 50 670
nqueens 5 116 5 128 50 556 50 580
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 706 50 776
protoboeuf-encode 5 197 5 207 50 836 50 828
rack 5 439 5 462 50 706 50 715
ruby-json 5 81 5 102 50 47 50 78
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 158
tinygql 5 41 5 44 50 35 50 49
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 448 50 456
attr_accessor 5 157 5 185 50 1834 50 1907
cfunc_itself 5 349 5 357 50 1255 50 1259
fib 5 124 5 142 50 940 50 940
getivar 5 217 5 321 50 2317 50 2427
getivar-module 5 104 5 138 50 90 50 269
keyword_args 5 100 5 102 50 1240 50 1243
loops-times 5 23 5 27 50 64 50 62
object-new 5 268 5 415 50 297 50 923
respond_to 5 139 5 137 50 3895 50 3897
ruby-xor 5 236 5 255 50 1313 50 1299
send_bmethod 5 116 5 126 50 5538 50 4527
send_cfunc_block 5 106 5 102 50 353 50 383
send_rubyfunc_block 5 250 5 258 50 6924 50 6930
setivar 5 359 5 480 50 4922 50 5043
setivar_object 5 341 5 302 50 750 50 550
setivar_young 5 342 5 305 50 796 50 565
str_concat 5 390 5 444 50 1202 50 1190
structaref 5 157 5 203 50 1811 50 1902
structaset 5 202 5 261 50 396 50 492
throw 5 1087 5 1469 50 1412 50 1893

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) 1554870 1359815 203 2671 0 0% 0 0 75.865102
chunky-png (click) 321055 295703 79 1376 1 0% 0 0 39.557434
erubi-rails (click) 1376302 1198692 268 3647 22 0% 0 0 97.070727
hexapdf (click) 1526038 1280717 593 15713 44 0% 0 0 435.995786
liquid-c (click) 558632 455857 114 2236 5 0% 0 0 59.839656
liquid-compile (click) 479310 429777 146 2738 2 0% 0 0 80.387498
liquid-render (click) 666263 621587 131 2959 8 0% 0 0 79.43205
lobsters (click) 8689148 7359810 3124 64102 120 0% 0 0 2109.29881
mail (click) 873724 848314 345 7768 40 0% 0 0 215.462605
psych-load (click) 286769 230352 61 831 2 0% 0 0 24.062401
railsbench (click) 3356012 2956451 1592 19756 97 0% 0 0 553.011532
rubocop (click) 5782292 5087583 3002 57113 125 0% 6 0 1665.85797
ruby-lsp (click) 1042997 880772 409 7472 47 0% 1 0 204.121556
sequel (click) 503303 438599 11 119 0 0% 0 0 4.015528
shipit (click) 7363854 6202669 3290 52170 176 0% 0 0 1719.841241
addressable-equality (click) 313968 272862 44 1380 1 0% 0 0 34.261666
addressable-getters (click) 275759 225568 26 863 0 0% 0 0 20.851216
addressable-join (click) 282251 218673 24 941 0 0% 0 0 23.410923
addressable-merge (click) 281164 261195 27 896 0 0% 0 0 22.416706
addressable-new (click) 258485 228996 21 569 0 0% 0 0 14.365556
addressable-normalize (click) 313142 280205 43 1362 1 0% 0 0 33.419311
addressable-parse (click) 279310 211822 26 880 0 0% 0 0 21.67846
addressable-setters (click) 254897 202299 20 584 0 0% 0 0 14.688699
addressable-to-s (click) 275581 241470 26 889 0 0% 0 0 21.43201
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.815383
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.251623
erubi (click) 248343 230801 6 134 0 0% 0 0 3.851589
etanni (click) 33355 27108 8 114 0 0% 0 0 3.522496
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.0571
fluentd (click) 487528 386635 7 116 0 0% 0 0 3.798515
graphql (click) 410404 350334 73 1909 19 0% 0 0 53.655985
graphql-native (click) 354779 300404 39 532 0 0% 0 0 14.223477
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.948994
lee (click) 317972 237030 49 1099 0 0% 0 0 31.266038
matmul (click) 11103 4709 8 136 0 0% 0 0 4.273058
nbody (click) 14448 21176 6 251 0 0% 0 0 6.144204
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.360083
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.971607
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.656949
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.203225
rack (click) 288605 258332 35 656 0 0% 0 0 17.019884
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.742335
rubyboy (click) 705156 614588 154 6873 42 0% 0 0 167.07209
rubykon (click) 149667 148880 138 2117 4 0% 0 0 57.40366
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.245669
tinygql (click) 301108 296304 59 1031 5 0% 0 0 27.325052
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1951.978618
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.325557
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.103566
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.537293
fib (click) 2659 2995 3 30 0 0% 0 0 1.141115
getivar (click) 3789 6778 3 79 0 0% 0 0 1.941194
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.321027
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.798171
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.97256
object-new (click) 2406 2818 2 36 0 0% 0 0 1.112683
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.142376
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.781495
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.857507
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.811677
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.434324
setivar (click) 2783 3726 3 46 0 0% 0 0 1.269207
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.429607
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.714209
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.3911
structaref (click) 4407 9095 3 88 0 0% 0 0 2.372049
structaset (click) 4113 5834 3 70 0 0% 0 0 1.805163
throw (click) 5953 4624 5 53 0 0% 0 0 1.814086

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.