Ruby Benchmarks

Details for Benchmarks at 2026-08-11 00:36:25 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.5% faster than CRuby 4.1.0dev
  • 10.1% faster than YJIT 3.4.7
On railsbench it is
  • 123.0% faster than CRuby 4.1.0dev
  • 16.7% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 6 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 92 5 96 50 201 50 234
chunky-png 5 31 5 32 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 445 50 629 50 671
liquid-compile 5 421 5 526 50 578 50 864
liquid-il 5 66 5 71 50 116 50 136
liquid-render 5 171 5 174 50 432 50 463
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 212 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 155 5 157 50 249 50 252
ruby-lsp 5 158 5 167 50 225 50 229
sequel 5 427 5 468 50 597 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 177 50 184 50 211
addressable-join 5 74 5 85 50 63 50 86
addressable-merge 5 162 5 163 50 221 50 239
addressable-new 5 351 5 362 50 520 50 555
addressable-normalize 5 53 5 58 50 60 50 72
addressable-parse 5 104 5 110 50 104 50 120
addressable-setters 5 185 5 195 50 232 50 258
addressable-to-s 5 164 5 176 50 182 50 212
binarytrees 5 82 5 88 50 136 50 166
blurhash 5 84 5 85 50 145 50 145
erubi 5 138 5 155 50 127 50 160
etanni 5 100 5 81 50 71 50 49
fannkuchredux 5 55 5 57 50 100 50 113
fluentd 5 57 5 75 50 20 50 34
gcbench 5 10 5 11 50 10 50 17
graphql 5 370 5 481 50 569 50 993
graphql-native 5 57 5 89 50 22 50 64
knucleotide 5 163 5 155 50 118 50 110
lee 5 23 5 33 50 10 50 20
matmul 5 53 5 53 50 88 50 100
nbody 5 250 5 244 50 663 50 683
nqueens 5 119 5 127 50 554 50 596
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 189 50 696 50 824
protoboeuf-encode 5 200 5 208 50 792 50 783
rack 5 444 5 483 50 711 50 787
ruby-json 5 84 5 116 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 210 50 250 50 243
string_malloc_pressure 5 146 5 35 50 100 50 10
sudoku 5 48 5 50 50 155 50 172
tinygql 5 41 5 44 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 455 50 455
attr_accessor 5 157 5 209 50 1832 50 1938
cfunc_itself 5 348 5 354 50 1255 50 1258
fib 5 124 5 143 50 939 50 940
getivar 5 211 5 330 50 2315 50 2438
getivar-module 5 103 5 146 50 88 50 124
keyword_args 5 100 5 106 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 482 50 295 50 1496
object-new-initialize 5 169 5 258 50 260 50 1022
object-new-no-escape 5 81 5 119 50 89 50 535
respond_to 5 139 5 133 50 3909 50 3905
ruby-xor 5 246 5 246 50 1306 50 1312
send_bmethod 5 118 5 122 50 5539 50 4527
send_cfunc_block 5 107 5 108 50 305 50 286
send_rubyfunc_block 5 196 5 211 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 298
setivar 5 359 5 349 50 4930 50 4924
setivar_object 5 341 5 286 50 763 50 700
setivar_young 5 342 5 286 50 806 50 739
str_concat 5 391 5 438 50 1192 50 990
structaref 5 138 5 208 50 1797 50 1910
structaset 5 199 5 237 50 370 50 482
throw 5 1110 5 1420 50 1447 50 1875

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) 1561342 1408945 204 2664 0 0% 0 0 74.324894
chunky-png (click) 322360 281242 79 1376 1 0% 0 0 37.997706
erubi-rails (click) 1380235 1243227 268 3626 23 0% 0 0 100.321909
hexapdf (click) 1528317 1308346 593 15741 45 0% 0 0 426.425991
liquid-c (click) 560859 515383 114 2236 5 0% 0 0 62.441574
liquid-compile (click) 477637 419791 146 2666 2 0% 0 0 73.707704
liquid-il (click) 614138 525238 70 2730 0 0% 0 0 80.201736
liquid-render (click) 668092 590859 131 2958 8 0% 0 0 77.907011
lobsters (click) 8543879 7267596 3126 63257 125 0% 0 0 2021.512134
mail (click) 867935 861809 345 7716 40 0% 0 0 208.193809
psych-load (click) 287975 241970 60 829 2 0% 0 0 23.164742
railsbench (click) 3353103 3070445 1591 19736 105 0% 0 0 570.62322
rubocop (click) 5762600 5023325 3000 57026 132 0% 6 0 1624.714758
ruby-lsp (click) 1048827 913619 408 7449 47 0% 1 0 199.276565
sequel (click) 522995 497181 11 119 0 0% 0 0 4.069233
shipit (click) 7070947 5934825 3189 51693 164 0% 0 0 1658.303041
addressable-equality (click) 323619 284183 44 1381 1 0% 0 0 33.534683
addressable-getters (click) 283902 251657 26 863 0 0% 0 0 20.43968
addressable-join (click) 289394 252050 24 941 0 0% 0 0 22.591457
addressable-merge (click) 289425 279184 27 896 0 0% 0 0 21.174612
addressable-new (click) 264256 227540 21 563 0 0% 0 0 13.57965
addressable-normalize (click) 318065 294270 43 1327 1 0% 0 0 31.831142
addressable-parse (click) 285702 276833 26 880 0 0% 0 0 20.681368
addressable-setters (click) 263534 228546 20 582 0 0% 0 0 13.756737
addressable-to-s (click) 283510 234227 26 849 0 0% 0 0 20.125645
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.752994
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.894178
erubi (click) 250127 224805 6 134 0 0% 0 0 3.845821
etanni (click) 33079 34728 8 114 0 0% 0 0 3.440853
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.91998
fluentd (click) 512142 424848 7 116 0 0% 0 0 3.554299
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.447255
graphql (click) 415076 380135 74 1940 18 0% 0 0 52.897655
graphql-native (click) 358207 312820 39 532 0 0% 0 0 13.585188
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.756614
lee (click) 319316 313221 50 1102 0 0% 0 0 30.38491
matmul (click) 11103 4709 8 136 0 0% 0 0 4.123718
nbody (click) 14448 21176 6 251 0 0% 0 0 6.221883
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.231905
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.846075
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.671413
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.383219
rack (click) 285482 278901 35 581 0 0% 0 0 14.554508
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.751808
rubyboy (click) 705496 639804 154 6875 42 0% 0 0 163.944431
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.78657
splay (click) 34617 22483 9 175 0 0% 0 0 5.340562
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.838872
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.966026
tinygql (click) 302454 265981 59 1026 5 0% 0 0 26.348621
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1878.231509
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.984648
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.083739
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.509767
fib (click) 2659 2995 3 30 0 0% 0 0 1.096433
getivar (click) 3789 6778 3 79 0 0% 0 0 1.926076
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.357462
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.838542
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.911141
object-new (click) 2406 2818 2 36 0 0% 0 0 1.003274
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.299446
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.747644
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.152556
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.814206
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.812743
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.323611
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.732975
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.059831
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261458
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.409789
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.723234
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.488742
structaref (click) 4407 9095 3 88 0 0% 0 0 2.308854
structaset (click) 4113 5834 3 70 0 0% 0 0 1.781608
throw (click) 5953 4624 5 53 0 0% 0 0 1.792851

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.