Ruby Benchmarks

Details for Benchmarks at 2026-07-01 01:25:54 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.1% faster than CRuby 4.1.0dev
  • 9.2% faster than YJIT 3.4.7
On railsbench it is
  • 117.0% faster than CRuby 4.1.0dev
  • 15.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 51 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 200 50 231
chunky-png 5 32 5 30 50 34 50 25
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 442 50 621 50 678
liquid-compile 5 422 5 511 50 580 50 845
liquid-render 5 173 5 171 50 433 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 254 50 303
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 246 50 249
ruby-lsp 5 154 5 161 50 227 50 232
sequel 5 429 5 462 50 595 50 667
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 171 50 183 50 208
addressable-join 5 74 5 83 50 65 50 84
addressable-merge 5 160 5 157 50 222 50 244
addressable-new 5 353 5 348 50 520 50 549
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 106 50 103 50 118
addressable-setters 5 186 5 186 50 234 50 253
addressable-to-s 5 164 5 171 50 182 50 208
binarytrees 5 82 5 86 50 136 50 143
blurhash 5 83 5 84 50 145 50 145
erubi 5 139 5 151 50 140 50 153
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 56 50 100 50 100
fluentd 5 62 5 64 50 21 50 27
gcbench 5 10 5 10 50 10 50 16
graphql 5 374 5 450 50 568 50 949
graphql-native 5 58 5 88 50 22 50 72
knucleotide 5 163 5 143 50 118 50 97
lee 5 23 5 29 50 10 50 16
matmul 5 53 5 53 50 88 50 95
nbody 5 250 5 244 50 663 50 676
nqueens 5 119 5 129 50 553 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 182 50 698 50 792
protoboeuf-encode 5 201 5 195 50 800 50 809
rack 5 442 5 464 50 724 50 790
ruby-json 5 84 5 113 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 207 5 206 50 247 50 244
sudoku 5 48 5 49 50 155 50 158
tinygql 5 42 5 43 50 40 50 53
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 453 50 457
attr_accessor 5 157 5 179 50 1832 50 1886
cfunc_itself 5 347 5 310 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 210 5 331 50 2305 50 2435
getivar-module 5 103 5 132 50 89 50 280
keyword_args 5 102 5 104 50 1239 50 1245
loops-times 5 23 5 24 50 63 50 62
object-new 5 268 5 477 50 296 50 1447
object-new-initialize 5 169 5 235 50 259 50 989
object-new-no-escape 5 81 5 137 50 89 50 505
respond_to 5 139 5 119 50 3903 50 3891
ruby-xor 5 247 5 239 50 1305 50 1309
send_bmethod 5 118 5 108 50 5539 50 4526
send_cfunc_block 5 107 5 103 50 305 50 292
send_rubyfunc_block 5 196 5 198 50 1372 50 1375
setivar 5 359 5 382 50 4931 50 4964
setivar_object 5 341 5 298 50 762 50 590
setivar_young 5 341 5 298 50 808 50 608
str_concat 5 391 5 430 50 1201 50 1037
structaref 5 153 5 182 50 1800 50 1868
structaset 5 198 5 177 50 371 50 488
throw 5 1109 5 1378 50 1439 50 1770

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) 1564884 1312699 203 2662 0 0% 0 0 74.018898
chunky-png (click) 325946 292438 79 1376 1 0% 0 0 38.719552
erubi-rails (click) 1388030 1160248 268 3626 23 0% 0 0 93.934954
hexapdf (click) 1516527 1333392 594 15771 44 0% 0 0 428.610643
liquid-c (click) 568228 529775 114 2240 5 0% 0 0 58.820712
liquid-compile (click) 483177 456973 146 2669 2 0% 0 0 73.333856
liquid-render (click) 674595 669573 131 2963 8 0% 0 0 77.993813
lobsters (click) 8550161 7211925 3124 63395 122 0% 0 0 2029.161488
mail (click) 872985 832412 345 7739 40 0% 0 0 208.304036
psych-load (click) 283130 225595 61 829 2 0% 0 0 23.294393
railsbench (click) 3360913 2880950 1592 19742 105 0% 0 0 537.081252
rubocop (click) 5806126 5059108 3002 57352 127 0% 6 0 1735.161524
ruby-lsp (click) 1053802 861158 409 7470 47 0% 1 0 200.447834
sequel (click) 511960 431787 11 119 0 0% 0 0 4.259609
shipit (click) 6947425 5895399 3128 50120 147 0% 0 0 1592.437772
addressable-equality (click) 307038 238482 44 1381 1 0% 0 0 33.227725
addressable-getters (click) 282188 240276 26 863 0 0% 0 0 20.053068
addressable-join (click) 291779 237302 24 941 0 0% 0 0 23.236997
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.41231
addressable-new (click) 262528 232455 21 563 0 0% 0 0 13.440577
addressable-normalize (click) 321355 280787 43 1327 1 0% 0 0 31.942705
addressable-parse (click) 270033 207826 26 880 0 0% 0 0 20.949479
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 14.032608
addressable-to-s (click) 281782 255526 26 849 0 0% 0 0 19.80671
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.726986
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.846589
erubi (click) 252789 234726 6 134 0 0% 0 0 3.858513
etanni (click) 32989 26478 8 114 0 0% 0 0 3.449911
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.913511
fluentd (click) 517903 478874 7 116 0 0% 0 0 3.578338
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.385582
graphql (click) 418858 383211 74 1940 19 0% 0 0 52.71145
graphql-native (click) 362125 299651 39 532 0 0% 0 0 13.748504
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.726496
lee (click) 303973 252487 50 1102 0 0% 0 0 30.140561
matmul (click) 11103 4709 8 136 0 0% 0 0 4.124883
nbody (click) 14448 21176 6 251 0 0% 0 0 6.109169
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.26763
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 107.204183
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.141961
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 43.082212
rack (click) 289104 257356 35 581 0 0% 0 0 14.552964
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.763331
rubyboy (click) 690105 611924 154 6871 42 0% 0 0 163.600315
rubykon (click) 147788 154811 138 2094 4 0% 0 0 55.184989
splay (click) 34617 22483 9 175 0 0% 0 0 5.241137
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.04451
tinygql (click) 305123 267690 59 1026 5 0% 0 0 26.377088
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1865.51459
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.525717
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.114868
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.508273
fib (click) 2659 2995 3 30 0 0% 0 0 1.102484
getivar (click) 3789 6778 3 79 0 0% 0 0 1.954517
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.346006
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.79703
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.905858
object-new (click) 2406 2818 2 36 0 0% 0 0 1.011165
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.299128
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.745235
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.171956
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.797612
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.802441
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.291279
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.805373
setivar (click) 2783 3726 3 46 0 0% 0 0 1.252944
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.398224
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.725422
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.486477
structaref (click) 4407 9095 3 88 0 0% 0 0 2.346393
structaset (click) 4113 5834 3 70 0 0% 0 0 1.769701
throw (click) 5953 4624 5 53 0 0% 0 0 1.748788

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.