Ruby Benchmarks

Details for Benchmarks at 2025-12-11 00:42:47 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 95.4% faster than CRuby 4.0.0dev
  • 5.6% faster than YJIT 3.4.7
On railsbench it is
  • 112.3% faster than CRuby 4.0.0dev
  • 8.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 8 minutes
aarch64 runtime: 7 hours, 3 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 90 5 97 50 191 50 228
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 422 50 625 50 626
liquid-compile 5 418 5 461 50 583 50 713
liquid-render 5 172 5 168 50 411 50 438
lobsters 5 19 5 20 50 10 50 10
mail 5 194 5 196 50 253 50 268
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 248 50 247
ruby-lsp 5 146 5 147 50 236 50 240
sequel 5 422 5 435 50 588 50 604
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 166 50 184 50 189
addressable-join 5 73 5 77 50 66 50 67
addressable-merge 5 159 5 154 50 222 50 214
addressable-new 5 354 5 345 50 522 50 500
addressable-normalize 5 53 5 53 50 59 50 56
addressable-parse 5 103 5 102 50 104 50 104
addressable-setters 5 184 5 180 50 229 50 224
addressable-to-s 5 163 5 165 50 182 50 188
binarytrees 5 82 5 84 50 136 50 133
blurhash 5 83 5 87 50 143 50 144
erubi 5 137 5 139 50 137 50 136
etanni 5 97 5 69 50 71 50 35
fannkuchredux 5 54 5 56 50 101 50 95
fluentd 5 56 5 65 50 20 50 32
graphql 5 372 5 452 50 534 50 931
graphql-native 5 58 5 79 50 22 50 64
knucleotide 5 163 5 162 50 117 50 116
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 52 50 94 50 91
nbody 5 246 5 258 50 677 50 704
nqueens 5 116 5 126 50 556 50 567
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 706 50 764
protoboeuf-encode 5 197 5 208 50 829 50 835
rack 5 434 5 440 50 714 50 682
ruby-json 5 82 5 99 50 46 50 72
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 154
tinygql 5 42 5 43 50 40 50 49
30k_ifelse 5 28 5 28 50 185 50 179
30k_methods 5 39 5 40 50 450 50 454
attr_accessor 5 158 5 169 50 1833 50 1914
cfunc_itself 5 348 5 352 50 1254 50 1259
fib 5 124 5 142 50 939 50 939
getivar 5 216 5 322 50 2314 50 2425
getivar-module 5 104 5 140 50 90 50 270
keyword_args 5 100 5 107 50 1239 50 1242
loops-times 5 23 5 26 50 64 50 54
object-new 5 268 5 344 50 297 50 579
respond_to 5 139 5 135 50 3888 50 3904
ruby-xor 5 237 5 247 50 1313 50 1291
send_bmethod 5 116 5 123 50 5539 50 5542
send_cfunc_block 5 105 5 98 50 353 50 334
send_rubyfunc_block 5 251 5 256 50 6924 50 6934
setivar 5 360 5 395 50 4924 50 4975
setivar_object 5 341 5 333 50 751 50 604
setivar_young 5 341 5 336 50 798 50 641
str_concat 5 390 5 453 50 1199 50 1186
structaref 5 157 5 209 50 1807 50 1911
structaset 5 202 5 230 50 394 50 357
throw 5 1086 5 1265 50 1418 50 1577

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) 1545587 1306467 203 2658 0 0% 0 0 75.925746
chunky-png (click) 319799 327294 79 1373 1 0% 0 0 39.077373
erubi-rails (click) 1368481 1186099 267 3635 22 0% 0 0 97.616296
hexapdf (click) 1523275 1354558 593 15656 44 0% 0 0 440.174605
liquid-c (click) 556022 487267 114 2228 5 0% 0 0 59.770053
liquid-compile (click) 480624 432665 146 2745 2 0% 0 0 81.51312
liquid-render (click) 662380 594543 131 2946 8 0% 0 0 80.608671
lobsters (click) 8660633 7265026 3111 63940 117 0% 0 0 2110.055249
mail (click) 864444 826006 342 7700 40 0% 0 0 212.713007
psych-load (click) 287558 232260 61 828 2 0% 0 0 23.407747
railsbench (click) 3344064 2960999 1586 19681 97 0% 0 0 551.123531
rubocop (click) 5760497 4924606 3002 56861 126 0% 6 0 1661.790297
ruby-lsp (click) 957865 779626 342 6701 44 0% 1 0 181.922324
sequel (click) 501695 389031 11 119 0 0% 0 0 3.917061
shipit (click) 7617943 6324787 3349 53488 181 0% 1 0 1767.92296
addressable-equality (click) 318114 261682 44 1381 1 0% 0 0 33.899265
addressable-getters (click) 277908 203577 26 863 0 0% 0 0 20.936071
addressable-join (click) 287901 250531 24 1005 0 0% 0 0 25.516632
addressable-merge (click) 284736 223801 27 896 0 0% 0 0 22.035283
addressable-new (click) 258734 212996 21 563 0 0% 0 0 13.944543
addressable-normalize (click) 314374 282154 43 1337 1 0% 0 0 33.083318
addressable-parse (click) 280625 230028 26 880 0 0% 0 0 21.663599
addressable-setters (click) 258924 231656 20 582 0 0% 0 0 14.383783
addressable-to-s (click) 278067 244346 26 849 0 0% 0 0 20.856364
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.845526
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.031785
erubi (click) 246947 238087 6 134 0 0% 0 0 3.937991
etanni (click) 32930 35718 8 114 0 0% 0 0 3.644401
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.013926
fluentd (click) 484717 426046 7 115 0 0% 0 0 3.741045
graphql (click) 409680 360709 73 1921 19 0% 0 0 53.913745
graphql-native (click) 354140 278130 39 532 0 0% 0 0 13.989399
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.648531
lee (click) 317523 287839 49 1097 0 0% 0 0 31.61237
matmul (click) 11103 4709 8 136 0 0% 0 0 4.189778
nbody (click) 14448 21176 6 251 0 0% 0 0 6.177249
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.423219
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.348528
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.452972
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.281288
rack (click) 280340 248035 35 580 0 0% 0 0 15.753316
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.730468
rubyboy (click) 703479 637755 154 6862 42 0% 0 0 166.538638
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.379057
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.616118
tinygql (click) 300100 270794 59 1030 4 0% 0 0 27.10171
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1932.947868
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.448012
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.084164
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.54355
fib (click) 2659 2995 3 30 0 0% 0 0 1.150017
getivar (click) 3789 6778 3 79 0 0% 0 0 1.92125
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.308845
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.858836
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.885057
object-new (click) 2406 2818 2 36 0 0% 0 0 1.125116
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.152456
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.826723
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.753684
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.3051
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.48443
setivar (click) 2783 3726 3 46 0 0% 0 0 1.246797
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.431332
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.741085
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.514194
structaref (click) 4407 9095 3 88 0 0% 0 0 2.368379
structaset (click) 3926 5614 3 70 0 0% 0 0 1.748647
throw (click) 5953 4624 5 53 0 0% 0 0 1.800775

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.