Ruby Benchmarks

Details for Benchmarks at 2026-07-08 00:55:45 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.1% faster than CRuby 4.1.0dev
  • 10.4% faster than YJIT 3.4.7
On railsbench it is
  • 117.2% faster than CRuby 4.1.0dev
  • 14.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 50 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 97 50 191 50 237
chunky-png 5 32 5 31 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 441 50 625 50 673
liquid-compile 5 418 5 510 50 580 50 843
liquid-render 5 172 5 174 50 409 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 206 50 254 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 252
ruby-lsp 5 153 5 162 50 226 50 232
sequel 5 422 5 467 50 597 50 659
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 172 50 184 50 207
addressable-join 5 75 5 85 50 65 50 81
addressable-merge 5 160 5 160 50 222 50 235
addressable-new 5 350 5 348 50 521 50 536
addressable-normalize 5 53 5 58 50 60 50 70
addressable-parse 5 104 5 107 50 103 50 117
addressable-setters 5 185 5 186 50 233 50 252
addressable-to-s 5 164 5 171 50 182 50 207
binarytrees 5 82 5 88 50 136 50 165
blurhash 5 84 5 84 50 145 50 145
erubi 5 138 5 152 50 125 50 156
etanni 5 100 5 79 50 72 50 46
fannkuchredux 5 55 5 57 50 101 50 107
fluentd 5 61 5 58 50 20 50 31
gcbench 5 10 5 10 50 10 50 17
graphql 5 370 5 472 50 568 50 973
graphql-native 5 58 5 90 50 22 50 68
knucleotide 5 162 5 141 50 117 50 95
lee 5 23 5 30 50 10 50 19
matmul 5 53 5 52 50 87 50 89
nbody 5 250 5 247 50 663 50 672
nqueens 5 119 5 128 50 553 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 185 50 697 50 803
protoboeuf-encode 5 200 5 203 50 804 50 808
rack 5 442 5 470 50 706 50 791
ruby-json 5 84 5 112 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 206 50 250 50 245
string_malloc_pressure 5 147 5 32 50 102 50 10
sudoku 5 48 5 48 50 155 50 156
tinygql 5 41 5 44 50 40 50 54
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 451 50 453
attr_accessor 5 157 5 163 50 1832 50 1860
cfunc_itself 5 347 5 336 50 1255 50 1258
fib 5 125 5 137 50 939 50 939
getivar 5 210 5 330 50 2307 50 2434
getivar-module 5 103 5 130 50 88 50 272
keyword_args 5 102 5 106 50 1240 50 1241
loops-times 5 23 5 24 50 63 50 60
object-new 5 268 5 472 50 297 50 1426
object-new-initialize 5 168 5 268 50 259 50 977
object-new-no-escape 5 81 5 143 50 89 50 502
respond_to 5 138 5 119 50 3897 50 3897
ruby-xor 5 247 5 233 50 1304 50 1311
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 107 5 99 50 305 50 303
send_rubyfunc_block 5 196 5 193 50 1372 50 1375
setivar 5 359 5 460 50 4929 50 5028
setivar_object 5 341 5 315 50 762 50 599
setivar_young 5 342 5 315 50 810 50 606
str_concat 5 395 5 436 50 1201 50 1085
structaref 5 153 5 182 50 1801 50 1861
structaset 5 198 5 229 50 369 50 485
throw 5 1113 5 1319 50 1447 50 1718

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) 1563405 1327386 204 2669 0 0% 0 0 74.877481
chunky-png (click) 322954 313097 79 1376 1 0% 0 0 37.867538
erubi-rails (click) 1383142 1146545 268 3626 23 0% 0 0 93.662011
hexapdf (click) 1534108 1313174 594 15758 44 0% 0 0 428.033637
liquid-c (click) 558264 508709 114 2240 5 0% 0 0 58.950459
liquid-compile (click) 481948 422423 146 2673 2 0% 0 0 72.847758
liquid-render (click) 674590 669675 131 2963 8 0% 0 0 77.340917
lobsters (click) 8549317 7143693 3126 63309 125 0% 0 0 2018.476037
mail (click) 867695 882355 345 7739 40 0% 0 0 208.084608
psych-load (click) 292535 237088 60 829 2 0% 0 0 23.416321
railsbench (click) 3354946 2988493 1592 19741 105 0% 0 0 535.199729
rubocop (click) 5795367 4996593 3001 57257 129 0% 6 0 1615.133887
ruby-lsp (click) 1051066 963801 408 7438 47 0% 1 0 197.472463
sequel (click) 510490 388623 11 119 0 0% 0 0 4.108235
shipit (click) 6873411 5868251 3136 50005 147 0% 0 0 1586.738031
addressable-equality (click) 326002 294011 44 1381 1 0% 0 0 33.323725
addressable-getters (click) 276884 257403 26 863 0 0% 0 0 20.067387
addressable-join (click) 282376 241412 24 941 0 0% 0 0 22.48603
addressable-merge (click) 290853 238219 27 896 0 0% 0 0 21.231914
addressable-new (click) 265684 235727 21 563 0 0% 0 0 13.428458
addressable-normalize (click) 320405 279151 43 1327 1 0% 0 0 31.884459
addressable-parse (click) 279596 242889 26 880 0 0% 0 0 20.744021
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 13.923239
addressable-to-s (click) 276492 215397 26 849 0 0% 0 0 19.838612
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.740161
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.734493
erubi (click) 242824 213543 6 134 0 0% 0 0 4.021552
etanni (click) 32989 26478 8 114 0 0% 0 0 3.393749
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.780587
fluentd (click) 513018 456209 7 116 0 0% 0 0 3.650154
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.441349
graphql (click) 418858 383211 74 1940 19 0% 0 0 53.367144
graphql-native (click) 361075 322497 39 532 0 0% 0 0 13.708793
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.852728
lee (click) 319952 304124 50 1102 0 0% 0 0 30.698562
matmul (click) 11103 4709 8 136 0 0% 0 0 4.093329
nbody (click) 14448 21176 6 251 0 0% 0 0 6.11517
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.212805
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.029305
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.913124
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.901141
rack (click) 288154 255688 35 581 0 0% 0 0 14.458988
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.722128
rubyboy (click) 699104 629946 154 6871 42 0% 0 0 163.238647
rubykon (click) 146630 137068 137 2078 3 0% 0 0 53.893221
splay (click) 34617 22483 9 175 0 0% 0 0 5.382181
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.728814
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.912294
tinygql (click) 295722 239017 59 1026 5 0% 0 0 26.497839
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1861.764319
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.20118
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.082379
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.515771
fib (click) 2659 2995 3 30 0 0% 0 0 1.137698
getivar (click) 3789 6778 3 79 0 0% 0 0 1.946206
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.304054
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.778481
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.922058
object-new (click) 2406 2818 2 36 0 0% 0 0 0.995083
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.318629
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.765112
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.134343
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.818906
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.793504
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.264422
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.725207
setivar (click) 2783 3726 3 46 0 0% 0 0 1.267132
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406768
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.693961
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.50594
structaref (click) 4407 9095 3 88 0 0% 0 0 2.354907
structaset (click) 4113 5834 3 70 0 0% 0 0 1.798753
throw (click) 5953 4624 5 53 0 0% 0 0 1.737694

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.