Ruby Benchmarks

Details for Benchmarks at 2026-07-12 00:58:46 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.0% faster than CRuby 4.1.0dev
  • 10.5% faster than YJIT 3.4.7
On railsbench it is
  • 113.6% faster than CRuby 4.1.0dev
  • 15.7% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 14 minutes
aarch64 runtime: 7 hours, 59 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 94 50 198 50 242
chunky-png 5 32 5 32 50 34 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 445 50 622 50 681
liquid-compile 5 419 5 519 50 579 50 848
liquid-render 5 172 5 174 50 430 50 471
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 50 253 50 307
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 247 50 247
ruby-lsp 5 154 5 158 50 221 50 228
sequel 5 429 5 464 50 579 50 668
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 30 50 12 50 18
addressable-getters 5 165 5 174 50 183 50 209
addressable-join 5 74 5 83 50 66 50 81
addressable-merge 5 162 5 162 50 222 50 240
addressable-new 5 354 5 352 50 521 50 532
addressable-normalize 5 53 5 59 50 60 50 71
addressable-parse 5 104 5 107 50 104 50 118
addressable-setters 5 185 5 188 50 235 50 252
addressable-to-s 5 163 5 173 50 183 50 208
binarytrees 5 81 5 86 50 136 50 163
blurhash 5 84 5 84 50 145 50 145
erubi 5 137 5 156 50 129 50 165
etanni 5 100 5 80 50 71 50 48
fannkuchredux 5 55 5 58 50 101 50 112
fluentd 5 70 5 60 50 21 50 29
gcbench 5 10 5 10 50 10 50 18
graphql 5 375 5 462 50 575 50 972
graphql-native 5 59 5 91 50 23 50 72
knucleotide 5 163 5 140 50 117 50 94
lee 5 23 5 30 50 10 50 17
matmul 5 53 5 53 50 88 50 100
nbody 5 250 5 246 50 663 50 627
nqueens 5 119 5 126 50 554 50 605
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 187 50 697 50 801
protoboeuf-encode 5 200 5 202 50 803 50 766
rack 5 438 5 478 50 710 50 798
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 208 50 247 50 250
string_malloc_pressure 5 146 5 35 50 102 50 10
sudoku 5 48 5 50 50 155 50 164
tinygql 5 41 5 43 50 40 50 55
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 452 50 457
attr_accessor 5 149 5 173 50 1831 50 1876
cfunc_itself 5 347 5 332 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 215 5 334 50 2306 50 2438
getivar-module 5 103 5 132 50 89 50 260
keyword_args 5 102 5 102 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 472 50 296 50 1484
object-new-initialize 5 168 5 238 50 259 50 1001
object-new-no-escape 5 80 5 131 50 89 50 525
respond_to 5 139 5 122 50 3902 50 3899
ruby-xor 5 247 5 237 50 1305 50 1315
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 104 50 305 50 325
send_rubyfunc_block 5 196 5 195 50 1371 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 433 50 4929 50 5007
setivar_object 5 341 5 315 50 763 50 729
setivar_young 5 342 5 314 50 809 50 755
str_concat 5 396 5 447 50 1199 50 1061
structaref 5 153 5 165 50 1798 50 1844
structaset 5 197 5 224 50 369 50 487
throw 5 1107 5 1334 50 1442 50 1739

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) 1561397 1415378 204 2674 0 0% 0 0 74.917967
chunky-png (click) 325946 292438 79 1376 1 0% 0 0 38.012914
erubi-rails (click) 1381546 1267381 268 3626 23 0% 0 0 93.859065
hexapdf (click) 1533323 1328751 594 15752 44 0% 0 0 427.991532
liquid-c (click) 550210 507805 114 2240 5 0% 0 0 58.816784
liquid-compile (click) 480963 430033 146 2673 2 0% 0 0 73.903103
liquid-render (click) 674590 669675 131 2963 8 0% 0 0 77.705913
lobsters (click) 8551657 7188209 3126 63326 124 0% 0 0 2018.680702
mail (click) 877091 845544 345 7739 40 0% 0 0 210.005575
psych-load (click) 292535 237088 60 829 2 0% 0 0 23.596357
railsbench (click) 3357375 2926743 1592 19741 105 0% 0 0 535.444445
rubocop (click) 5794650 5020952 3001 57257 129 0% 6 0 1650.04065
ruby-lsp (click) 1051760 964977 408 7438 47 0% 1 0 200.241958
sequel (click) 509403 486351 11 119 0 0% 0 0 4.140696
shipit (click) 7236956 6179645 3184 51697 164 0% 0 0 1647.95371
addressable-equality (click) 323681 275138 44 1381 1 0% 0 0 33.05127
addressable-getters (click) 286285 253293 26 863 0 0% 0 0 20.338724
addressable-join (click) 289456 234813 24 941 0 0% 0 0 22.624825
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.41604
addressable-new (click) 266639 229176 21 563 0 0% 0 0 13.68418
addressable-normalize (click) 319039 253727 43 1327 1 0% 0 0 31.63408
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 21.162002
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 14.166299
addressable-to-s (click) 283572 216990 26 849 0 0% 0 0 19.921393
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.713548
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.82628
erubi (click) 252789 234726 6 134 0 0% 0 0 3.853985
etanni (click) 32989 26478 8 114 0 0% 0 0 3.430884
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.768235
fluentd (click) 514692 417601 7 116 0 0% 0 0 3.546418
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.417353
graphql (click) 418858 383211 74 1940 19 0% 0 0 53.275192
graphql-native (click) 343154 293241 39 532 0 0% 0 0 13.947526
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.642714
lee (click) 322939 299824 50 1102 0 0% 0 0 30.544903
matmul (click) 11103 4709 8 136 0 0% 0 0 4.130678
nbody (click) 14448 21176 6 251 0 0% 0 0 6.164808
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.249223
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.863462
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.998975
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 43.114213
rack (click) 270140 259106 35 581 0 0% 0 0 14.51654
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.688498
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 163.339096
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.614761
splay (click) 34617 22483 9 175 0 0% 0 0 5.446689
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.731135
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.902911
tinygql (click) 303086 290010 59 1026 5 0% 0 0 26.418837
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.899706
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.052397
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.09613
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.49406
fib (click) 2659 2995 3 30 0 0% 0 0 1.108822
getivar (click) 3789 6778 3 79 0 0% 0 0 1.902877
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.352442
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.810195
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.963019
object-new (click) 2406 2818 2 36 0 0% 0 0 0.99016
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.287336
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.752429
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.117444
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.743998
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.817598
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.276289
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.761131
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.072971
setivar (click) 2783 3726 3 46 0 0% 0 0 1.254266
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.409747
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.723841
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.49811
structaref (click) 4407 9095 3 88 0 0% 0 0 2.33189
structaset (click) 4113 5834 3 70 0 0% 0 0 1.782429
throw (click) 5953 4624 5 53 0 0% 0 0 1.765136

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.