Ruby Benchmarks

Details for Benchmarks at 2026-08-20 00:33:58 UTC

YJIT metrics from the ruby-bench suite using Ruby 107ac95db7.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.7% faster than CRuby 4.1.0dev
  • 8.4% faster than YJIT 3.4.7
On railsbench it is
  • 121.4% faster than CRuby 4.1.0dev
  • 17.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 47 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 202 50 228
chunky-png 5 32 5 32 50 34 50 28
erubi-rails 5 16 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 445 50 621 50 665
liquid-compile 5 420 5 527 50 578 50 849
liquid-il 5 66 5 70 50 116 50 136
liquid-render 5 173 5 175 50 433 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 214 50 254 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 158 50 245 50 248
ruby-lsp 5 156 5 163 50 227 50 230
sequel 5 423 5 467 50 587 50 664
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 19
addressable-getters 5 165 5 177 50 184 50 217
addressable-join 5 75 5 86 50 66 50 87
addressable-merge 5 161 5 162 50 221 50 244
addressable-new 5 354 5 363 50 518 50 546
addressable-normalize 5 52 5 59 50 61 50 72
addressable-parse 5 104 5 110 50 104 50 123
addressable-setters 5 185 5 196 50 233 50 262
addressable-to-s 5 165 5 177 50 182 50 214
binarytrees 5 82 5 94 50 136 50 146
blurhash 5 84 5 86 50 145 50 145
erubi 5 136 5 153 50 130 50 158
etanni 5 101 5 83 50 72 50 49
fannkuchredux 5 55 5 56 50 100 50 111
fluentd 5 63 5 69 50 20 50 48
gcbench 5 10 5 11 50 10 50 16
graphql 5 375 5 482 50 572 50 999
graphql-native 5 59 5 87 50 22 50 69
knucleotide 5 163 5 154 50 118 50 108
lee 5 23 5 33 50 10 50 22
matmul 5 53 5 50 50 88 50 99
nbody 5 248 5 255 50 662 50 690
nqueens 5 119 5 127 50 554 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 696 50 804
protoboeuf-encode 5 199 5 202 50 793 50 812
rack 5 441 5 460 50 714 50 728
ruby-json 5 84 5 116 50 50 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 209 5 215 50 250 50 246
string_malloc_pressure 5 147 5 32 50 102 50 10
sudoku 5 48 5 49 50 155 50 174
tinygql 5 41 5 45 50 40 50 56
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 455 50 456
attr_accessor 5 157 5 204 50 1834 50 1932
cfunc_itself 5 346 5 347 50 1255 50 1258
fib 5 125 5 145 50 939 50 939
getivar 5 210 5 317 50 2307 50 2425
getivar-module 5 103 5 138 50 89 50 121
keyword_args 5 102 5 105 50 1240 50 1243
loops-times 5 23 5 27 50 63 50 62
object-new 5 269 5 488 50 297 50 1512
object-new-initialize 5 168 5 260 50 260 50 1011
object-new-no-escape 5 81 5 143 50 89 50 535
respond_to 5 139 5 125 50 3903 50 3899
ruby-xor 5 247 5 243 50 1305 50 1316
send_bmethod 5 118 5 123 50 5538 50 4527
send_cfunc_block 5 106 5 112 50 305 50 309
send_rubyfunc_block 5 195 5 207 50 1371 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 350 50 4931 50 4924
setivar_object 5 341 5 287 50 761 50 775
setivar_young 5 341 5 221 50 810 50 827
str_concat 5 390 5 421 50 1195 50 928
structaref 5 153 5 184 50 1800 50 1871
structaset 5 198 5 252 50 368 50 485
throw 5 1107 5 1427 50 1446 50 1914

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) 1561995 1409016 204 2657 0 0% 0 0 78.364761
chunky-png (click) 323272 274340 79 1376 1 0% 0 0 38.254949
erubi-rails (click) 1380181 1185808 268 3626 23 0% 0 0 99.839714
hexapdf (click) 1528107 1324317 593 15741 45 0% 0 0 432.187343
liquid-c (click) 561082 507440 113 2224 5 0% 0 0 61.340073
liquid-compile (click) 477637 419791 146 2666 2 0% 0 0 72.769086
liquid-il (click) 613555 533815 70 2723 0 0% 0 0 79.812265
liquid-render (click) 666448 588242 130 2946 8 0% 0 0 76.700015
lobsters (click) 8553483 7254163 3126 63358 125 0% 0 0 2027.479443
mail (click) 869626 838775 345 7716 40 0% 0 0 207.694995
psych-load (click) 287975 241970 60 829 2 0% 0 0 23.211861
railsbench (click) 3350904 2837231 1591 19736 105 0% 0 0 534.585362
rubocop (click) 5762600 5006886 3000 57026 132 0% 6 0 1615.606409
ruby-lsp (click) 1049426 865339 408 7449 47 0% 1 0 197.816451
sequel (click) 496033 411913 11 119 0 0% 0 0 4.227703
shipit (click) 6885139 5757819 3136 50048 147 0% 0 0 1637.049232
addressable-equality (click) 323619 284183 44 1381 1 0% 0 0 33.446198
addressable-getters (click) 283902 268041 26 863 0 0% 0 0 20.002833
addressable-join (click) 288136 250098 24 941 0 0% 0 0 22.194671
addressable-merge (click) 289425 262800 27 896 0 0% 0 0 21.295213
addressable-new (click) 260423 206564 21 563 0 0% 0 0 13.320628
addressable-normalize (click) 318977 279156 43 1327 1 0% 0 0 31.387842
addressable-parse (click) 286614 253527 26 880 0 0% 0 0 20.99139
addressable-setters (click) 264451 229821 20 582 0 0% 0 0 13.973173
addressable-to-s (click) 283510 250611 26 849 0 0% 0 0 19.786886
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.769406
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.833684
erubi (click) 246874 229434 6 134 0 0% 0 0 3.847814
etanni (click) 30080 23270 8 114 0 0% 0 0 3.416761
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.844443
fluentd (click) 512142 424812 7 116 0 0% 0 0 3.541941
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.444224
graphql (click) 415078 388327 74 1940 18 0% 0 0 52.80042
graphql-native (click) 358207 312820 39 532 0 0% 0 0 13.714172
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.77619
lee (click) 319413 296895 50 1102 0 0% 0 0 30.213066
matmul (click) 11103 4709 8 136 0 0% 0 0 4.028565
nbody (click) 14448 21176 6 251 0 0% 0 0 6.070388
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.286287
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.183564
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.422818
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.420218
rack (click) 285482 262517 35 581 0 0% 0 0 14.696565
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.747904
rubyboy (click) 687163 609297 154 6875 42 0% 0 0 162.39333
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.405169
splay (click) 34617 22483 9 175 0 0% 0 0 5.254362
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.768106
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.919114
tinygql (click) 302454 265981 59 1026 5 0% 0 0 26.34635
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1864.191854
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.318049
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.053171
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.504594
fib (click) 2659 2995 3 30 0 0% 0 0 1.099575
getivar (click) 3789 6778 3 79 0 0% 0 0 1.909422
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.325098
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.797641
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.916058
object-new (click) 2406 2818 2 36 0 0% 0 0 0.98542
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.300581
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.773394
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.104708
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.787047
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.799306
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.30656
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.727554
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.062728
setivar (click) 2783 3726 3 46 0 0% 0 0 1.263582
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.393912
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.708699
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.431649
structaref (click) 4407 9095 3 88 0 0% 0 0 2.338912
structaset (click) 4113 5834 3 70 0 0% 0 0 1.776875
throw (click) 5953 4624 5 53 0 0% 0 0 1.770095

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.