Ruby Benchmarks

Details for Benchmarks at 2026-06-21 01:32:41 UTC

YJIT metrics from the ruby-bench suite using Ruby 34d51d56e2.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.9% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
On railsbench it is
  • 119.6% faster than CRuby 4.1.0dev
  • 16.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 58 minutes
aarch64 runtime: 7 hours, 49 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 96 50 198 50 239
chunky-png 5 32 5 30 50 34 50 26
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 619 50 679
liquid-compile 5 419 5 513 50 584 50 840
liquid-render 5 173 5 172 50 431 50 470
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 50 253 50 304
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 247 50 254
ruby-lsp 5 158 5 161 50 229 50 232
sequel 5 421 5 465 50 590 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 164 5 171 50 183 50 209
addressable-join 5 75 5 84 50 65 50 83
addressable-merge 5 161 5 159 50 222 50 243
addressable-new 5 354 5 345 50 518 50 543
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 106 50 104 50 118
addressable-setters 5 186 5 186 50 234 50 258
addressable-to-s 5 163 5 171 50 182 50 207
binarytrees 5 82 5 86 50 136 50 145
blurhash 5 84 5 85 50 145 50 145
erubi 5 138 5 149 50 140 50 152
etanni 5 99 5 81 50 73 50 47
fannkuchredux 5 55 5 57 50 100 50 105
fluentd 5 62 5 60 50 30 50 26
gcbench 5 10 5 10 50 10 50 16
graphql 5 359 5 467 50 569 50 979
graphql-native 5 59 5 88 50 22 50 71
knucleotide 5 163 5 144 50 117 50 98
lee 5 23 5 29 50 10 50 17
matmul 5 53 5 53 50 87 50 94
nbody 5 250 5 245 50 663 50 631
nqueens 5 119 5 128 50 554 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 185 50 697 50 807
protoboeuf-encode 5 201 5 197 50 803 50 785
rack 5 442 5 478 50 708 50 800
ruby-json 5 84 5 114 50 50 50 93
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 241
sudoku 5 48 5 50 50 155 50 159
tinygql 5 41 5 43 50 40 50 54
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 449 50 456
attr_accessor 5 157 5 175 50 1831 50 1872
cfunc_itself 5 346 5 310 50 1255 50 1258
fib 5 124 5 138 50 939 50 926
getivar 5 216 5 334 50 2315 50 2438
getivar-module 5 103 5 138 50 89 50 284
keyword_args 5 102 5 107 50 1240 50 1245
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 477 50 297 50 1447
object-new-initialize 5 169 5 235 50 259 50 978
object-new-no-escape 5 81 5 138 50 89 50 491
respond_to 5 139 5 122 50 3900 50 3904
ruby-xor 5 245 5 237 50 1305 50 1309
send_bmethod 5 118 5 110 50 5539 50 4526
send_cfunc_block 5 107 5 103 50 304 50 313
send_rubyfunc_block 5 195 5 197 50 1372 50 1375
setivar 5 359 5 382 50 4930 50 4961
setivar_object 5 341 5 308 50 762 50 657
setivar_young 5 342 5 307 50 810 50 685
str_concat 5 391 5 426 50 1201 50 1044
structaref 5 153 5 179 50 1799 50 1856
structaset 5 198 5 221 50 368 50 489
throw 5 1107 5 1378 50 1440 50 1776

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) 1563134 1359770 203 2651 0 0% 0 0 73.685176
chunky-png (click) 325394 274948 79 1376 1 0% 0 0 37.930132
erubi-rails (click) 1389155 1234563 268 3626 23 0% 0 0 94.075903
hexapdf (click) 1533483 1361432 593 15767 44 0% 0 0 431.758895
liquid-c (click) 566818 543831 114 2240 5 0% 0 0 58.868507
liquid-compile (click) 472574 361808 146 2669 2 0% 0 0 73.867634
liquid-render (click) 674097 578408 131 2963 8 0% 0 0 77.513941
lobsters (click) 8556187 7212172 3123 63449 122 0% 0 0 2016.31563
mail (click) 875781 859038 345 7738 40 0% 0 0 208.256104
psych-load (click) 284642 267548 61 829 2 0% 0 0 23.301145
railsbench (click) 3363015 2816357 1592 19742 105 0% 0 0 534.075715
rubocop (click) 5809928 5126763 3002 57381 127 0% 6 0 1624.317965
ruby-lsp (click) 1044164 832368 409 7470 47 0% 1 0 197.822534
sequel (click) 511413 463486 11 119 0 0% 0 0 4.141453
shipit (click) 7231250 6152454 3166 51530 154 0% 0 0 1629.445538
addressable-equality (click) 324595 291658 44 1380 1 0% 0 0 33.148537
addressable-getters (click) 285844 219531 26 863 0 0% 0 0 20.213725
addressable-join (click) 290306 251310 24 941 0 0% 0 0 22.76127
addressable-merge (click) 290058 278216 27 896 0 0% 0 0 21.336958
addressable-new (click) 266080 228090 21 563 0 0% 0 0 13.518765
addressable-normalize (click) 311102 284306 43 1327 1 0% 0 0 31.407277
addressable-parse (click) 278744 242298 26 880 0 0% 0 0 20.883914
addressable-setters (click) 266275 230371 20 582 0 0% 0 0 14.041298
addressable-to-s (click) 275073 238961 26 849 0 0% 0 0 19.879795
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.788347
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.877338
erubi (click) 252242 241817 6 134 0 0% 0 0 3.856052
etanni (click) 32989 26478 8 114 0 0% 0 0 3.39897
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.813528
fluentd (click) 512883 471258 7 116 0 0% 0 0 3.616754
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.356982
graphql (click) 418351 373967 74 1940 19 0% 0 0 52.6928
graphql-native (click) 360514 346222 39 532 0 0% 0 0 13.662165
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.61922
lee (click) 314620 264685 50 1102 0 0% 0 0 30.214827
matmul (click) 11103 4709 8 136 0 0% 0 0 4.143364
nbody (click) 14448 21176 6 251 0 0% 0 0 6.148184
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.304042
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.956321
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.853891
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.128494
rack (click) 287352 254669 35 581 0 0% 0 0 14.561488
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.732623
rubyboy (click) 707386 664902 154 6871 42 0% 0 0 164.040056
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.950738
splay (click) 34617 22483 9 175 0 0% 0 0 5.230451
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.87236
tinygql (click) 294853 238332 59 1026 5 0% 0 0 26.367897
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1863.801448
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.236965
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.103432
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.524494
fib (click) 2659 2995 3 30 0 0% 0 0 1.103194
getivar (click) 3789 6778 3 79 0 0% 0 0 1.902122
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.314081
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.82511
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.904773
object-new (click) 2406 2818 2 36 0 0% 0 0 0.962913
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.299549
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.735745
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.156149
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.781346
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.821398
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.300807
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.737605
setivar (click) 2783 3726 3 46 0 0% 0 0 1.265752
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.400978
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.687864
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.474438
structaref (click) 4407 9095 3 88 0 0% 0 0 2.311771
structaset (click) 4113 5834 3 70 0 0% 0 0 1.784565
throw (click) 5953 4624 5 53 0 0% 0 0 1.783736

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.