Ruby Benchmarks

Details for Benchmarks at 2026-06-29 01:25:55 UTC

YJIT metrics from the ruby-bench suite using Ruby 7402021a4a.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.7% faster than CRuby 4.1.0dev
  • 10.3% faster than YJIT 3.4.7
On railsbench it is
  • 119.8% faster than CRuby 4.1.0dev
  • 17.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 53 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 93 5 97 50 201 50 240
chunky-png 5 32 5 30 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 441 50 621 50 677
liquid-compile 5 418 5 513 50 551 50 840
liquid-render 5 172 5 173 50 430 50 467
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 209 50 252 50 306
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 244
ruby-lsp 5 157 5 158 50 223 50 226
sequel 5 418 5 468 50 599 50 663
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 170 50 182 50 207
addressable-join 5 74 5 81 50 66 50 83
addressable-merge 5 160 5 157 50 222 50 243
addressable-new 5 354 5 345 50 520 50 536
addressable-normalize 5 53 5 58 50 60 50 70
addressable-parse 5 103 5 106 50 103 50 118
addressable-setters 5 184 5 185 50 233 50 253
addressable-to-s 5 164 5 167 50 182 50 205
binarytrees 5 81 5 87 50 136 50 144
blurhash 5 83 5 84 50 145 50 145
erubi 5 141 5 150 50 139 50 155
etanni 5 100 5 81 50 73 50 48
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 69 5 60 50 20 50 27
gcbench 5 10 5 10 50 10 50 16
graphql 5 366 5 474 50 573 50 981
graphql-native 5 58 5 89 50 22 50 66
knucleotide 5 163 5 144 50 116 50 97
lee 5 23 5 29 50 10 50 16
matmul 5 53 5 53 50 88 50 93
nbody 5 248 5 243 50 663 50 652
nqueens 5 119 5 128 50 554 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 697 50 796
protoboeuf-encode 5 201 5 191 50 802 50 807
rack 5 441 5 464 50 706 50 802
ruby-json 5 84 5 113 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 250 50 247
sudoku 5 48 5 49 50 155 50 157
tinygql 5 41 5 44 50 40 50 54
30k_ifelse 5 28 5 28 50 185 50 186
30k_methods 5 38 5 39 50 457 50 455
attr_accessor 5 156 5 187 50 1833 50 1901
cfunc_itself 5 346 5 311 50 1255 50 1258
fib 5 125 5 137 50 939 50 939
getivar 5 211 5 338 50 2313 50 2439
getivar-module 5 103 5 140 50 89 50 285
keyword_args 5 102 5 104 50 1240 50 1245
loops-times 5 23 5 26 50 63 50 35
object-new 5 268 5 476 50 296 50 1445
object-new-initialize 5 169 5 232 50 259 50 991
object-new-no-escape 5 81 5 137 50 89 50 504
respond_to 5 139 5 126 50 3902 50 3894
ruby-xor 5 247 5 234 50 1306 50 1312
send_bmethod 5 118 5 108 50 5539 50 4526
send_cfunc_block 5 107 5 103 50 305 50 283
send_rubyfunc_block 5 196 5 195 50 1372 50 1375
setivar 5 359 5 380 50 4930 50 4956
setivar_object 5 341 5 294 50 763 50 596
setivar_young 5 342 5 294 50 808 50 607
str_concat 5 390 5 427 50 1201 50 1045
structaref 5 153 5 191 50 1799 50 1879
structaset 5 198 5 209 50 371 50 490
throw 5 1107 5 1364 50 1437 50 1780

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) 1564783 1279748 203 2661 0 0% 0 0 74.706069
chunky-png (click) 306977 269677 79 1376 1 0% 0 0 38.520795
erubi-rails (click) 1388027 1135740 268 3626 23 0% 0 0 93.797054
hexapdf (click) 1535618 1323378 594 15772 44 0% 0 0 429.077797
liquid-c (click) 568228 529775 114 2240 5 0% 0 0 58.782147
liquid-compile (click) 483177 456973 146 2669 2 0% 0 0 73.441863
liquid-render (click) 674595 669573 131 2963 8 0% 0 0 77.771245
lobsters (click) 8562695 7259820 3123 63436 122 0% 0 0 2023.725229
mail (click) 877093 861928 345 7739 40 0% 0 0 208.74928
psych-load (click) 293257 245644 61 829 2 0% 0 0 23.563275
railsbench (click) 3360885 2913800 1592 19741 105 0% 0 0 537.768306
rubocop (click) 5806126 5059076 3002 57352 127 0% 6 0 1650.601275
ruby-lsp (click) 1053209 884679 409 7470 47 0% 1 0 200.378749
sequel (click) 511962 423627 11 119 0 0% 0 0 4.508011
shipit (click) 7053150 5996459 3127 49973 147 0% 0 0 1583.891585
addressable-equality (click) 326002 294011 44 1381 1 0% 0 0 33.435496
addressable-getters (click) 286285 253293 26 863 0 0% 0 0 20.470851
addressable-join (click) 291779 237302 24 941 0 0% 0 0 22.85255
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.660501
addressable-new (click) 266639 229176 21 563 0 0% 0 0 13.746352
addressable-normalize (click) 320150 279201 43 1327 1 0% 0 0 31.62117
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 21.316669
addressable-setters (click) 266550 239436 20 582 0 0% 0 0 14.257104
addressable-to-s (click) 284683 250656 26 849 0 0% 0 0 20.153921
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.740354
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.798978
erubi (click) 252789 234726 6 134 0 0% 0 0 3.836341
etanni (click) 32989 26478 8 114 0 0% 0 0 3.416667
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.840696
fluentd (click) 518704 430434 7 116 0 0% 0 0 3.631596
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.351941
graphql (click) 418853 366827 74 1940 19 0% 0 0 52.850613
graphql-native (click) 342861 276541 39 532 0 0% 0 0 13.650574
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.713137
lee (click) 322939 299824 50 1102 0 0% 0 0 30.305579
matmul (click) 11103 4709 8 136 0 0% 0 0 4.137229
nbody (click) 14448 21176 6 251 0 0% 0 0 6.139277
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.260717
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.655308
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.051176
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 43.020148
rack (click) 269847 258790 35 581 0 0% 0 0 14.670979
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.83821
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 163.122048
rubykon (click) 147788 154811 138 2094 4 0% 0 0 55.285136
splay (click) 34617 22483 9 175 0 0% 0 0 5.352144
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.087547
tinygql (click) 302169 272336 59 1026 5 0% 0 0 26.564019
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1873.763029
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.501701
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.091747
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.476968
fib (click) 2659 2995 3 30 0 0% 0 0 1.093653
getivar (click) 3789 6778 3 79 0 0% 0 0 1.944491
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.350355
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.782861
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.862351
object-new (click) 2406 2818 2 36 0 0% 0 0 0.983176
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.301352
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.763981
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.126903
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.825202
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.778441
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.272318
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.712929
setivar (click) 2783 3726 3 46 0 0% 0 0 1.234376
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.412907
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.709114
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.457142
structaref (click) 4407 9095 3 88 0 0% 0 0 2.345655
structaset (click) 4113 5834 3 70 0 0% 0 0 1.784503
throw (click) 5953 4624 5 53 0 0% 0 0 1.762589

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.