Ruby Benchmarks

Details for Benchmarks at 2026-09-20 01:07:47 UTC

YJIT metrics from the ruby-bench suite using Ruby 11bb12ad3c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.2% faster than CRuby 4.1.0dev
  • 9.5% faster than YJIT 3.4.7
On railsbench it is
  • 120.1% faster than CRuby 4.1.0dev
  • 18.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 53 minutes
aarch64 runtime: 8 hours, 25 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 95 50 202 50 223
chunky-png 5 32 5 33 50 34 50 32
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 446 50 630 50 667
liquid-compile 5 420 5 522 50 548 50 844
liquid-il 5 66 5 69 50 116 50 130
liquid-render 5 170 5 173 50 436 50 462
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 211 50 255 50 299
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 247 50 252
ruby-lsp 5 156 5 167 50 223 50 230
sequel 5 427 5 458 50 591 50 654
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 18
addressable-getters 5 164 5 177 50 184 50 214
addressable-join 5 75 5 86 50 66 50 83
addressable-merge 5 161 5 165 50 223 50 244
addressable-new 5 351 5 363 50 518 50 541
addressable-normalize 5 53 5 59 50 60 50 70
addressable-parse 5 104 5 111 50 104 50 119
addressable-setters 5 185 5 195 50 232 50 253
addressable-to-s 5 163 5 175 50 182 50 211
binarytrees 5 82 5 91 50 136 50 171
blurhash 5 84 5 85 50 145 50 143
erubi 5 139 5 150 50 137 50 151
etanni 5 99 5 80 50 71 50 48
fannkuchredux 5 55 5 57 50 100 50 110
fluentd 5 56 5 65 50 21 50 35
gcbench 5 10 5 11 50 10 50 16
grape 5 27 5 30 50 15 50 28
graphql 5 370 5 469 50 573 50 981
graphql-native 5 58 5 87 50 22 50 69
knucleotide 5 163 5 156 50 117 50 109
lee 5 23 5 33 50 10 50 24
matmul 5 53 5 55 50 88 50 91
nbody 5 249 5 287 50 663 50 703
nqueens 5 119 5 126 50 554 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 697 50 809
protoboeuf-encode 5 201 5 202 50 792 50 790
rack 5 443 5 452 50 713 50 741
ruby-json 5 82 5 114 50 50 50 89
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 225 50 250 50 275
string_malloc_pressure 5 145 5 30 50 102 50 10
sudoku 5 48 5 49 50 155 50 161
tinygql 5 41 5 44 50 40 50 55
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 454 50 458
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 150 5 212 50 1835 50 1943
block_methods 5 10 5 10 50 10 50 10
cfunc_itself 5 345 5 353 50 1255 50 1258
fib 5 124 5 146 50 939 50 938
getivar 5 216 5 315 50 2315 50 2426
getivar-module 5 103 5 138 50 87 50 160
keyword_args 5 102 5 96 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 657 50 298 50 1550
object-new-initialize 5 169 5 270 50 259 50 1018
object-new-no-escape 5 81 5 151 50 89 50 538
respond_to 5 139 5 129 50 3903 50 3905
ruby-xor 5 247 5 253 50 1305 50 1308
send_bmethod 5 118 5 117 50 5539 50 4527
send_cfunc_block 5 106 5 106 50 305 50 293
send_rubyfunc_block 5 196 5 196 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 297
setivar 5 359 5 349 50 4930 50 4924
setivar_object 5 341 5 287 50 765 50 722
setivar_young 5 342 5 286 50 808 50 725
str_concat 5 392 5 422 50 1195 50 953
struct-new-no-escape 5 148 5 210 50 151 50 328
structaref 5 153 5 207 50 1794 50 1890
structaset 5 199 5 256 50 370 50 2642
throw 5 1108 5 1359 50 1446 50 1721

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) 1580919 1362710 204 2687 0 0% 0 0 74.738434
chunky-png (click) 332524 310757 79 1378 1 0% 0 0 38.01657
erubi-rails (click) 1395960 1258922 268 3636 23 0% 0 0 94.422145
hexapdf (click) 1535136 1337676 593 15773 45 0% 0 0 426.737878
liquid-c (click) 570170 537315 113 2235 5 0% 0 0 62.244599
liquid-compile (click) 468374 402518 146 2677 2 0% 0 0 74.171779
liquid-il (click) 620144 528059 70 2730 0 0% 0 0 79.459494
liquid-render (click) 673448 591635 130 2957 8 0% 0 0 77.418506
lobsters (click) 8561267 7035294 3126 63545 125 0% 0 0 2031.727527
mail (click) 881962 807505 345 7750 40 0% 0 0 208.273904
psych-load (click) 297793 271164 60 836 2 0% 0 0 23.56158
railsbench (click) 3406573 3103152 1591 19816 105 0% 0 0 570.905114
rubocop (click) 5770942 5014382 3000 57133 134 0% 6 0 1610.169436
ruby-lsp (click) 1062274 925683 407 7461 46 0% 1 0 198.862859
sequel (click) 520670 444350 11 119 0 0% 0 0 4.00327
shipit (click) 6901346 5799017 3137 50434 147 0% 0 0 1614.451915
addressable-equality (click) 316147 291756 44 1382 1 0% 0 0 32.654362
addressable-getters (click) 294501 232106 26 863 0 0% 0 0 20.557126
addressable-join (click) 299938 240695 24 941 0 0% 0 0 23.170702
addressable-merge (click) 281980 253978 27 896 0 0% 0 0 21.271023
addressable-new (click) 274855 216192 21 564 0 0% 0 0 13.847472
addressable-normalize (click) 329544 235035 43 1328 1 0% 0 0 31.785737
addressable-parse (click) 295176 248084 26 880 0 0% 0 0 20.801207
addressable-setters (click) 275045 210265 20 582 0 0% 0 0 14.464301
addressable-to-s (click) 291155 227509 26 849 0 0% 0 0 19.860866
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.794884
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.875683
erubi (click) 256290 224851 6 135 0 0% 0 0 3.881269
etanni (click) 29494 22579 8 114 0 0% 0 0 3.462477
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.855227
fluentd (click) 528352 453820 7 116 0 0% 0 0 3.530553
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.455551
grape (click) 775383 625495 89 1021 0 0% 0 0 25.859446
graphql (click) 423703 384164 74 1944 18 0% 0 0 52.708295
graphql-native (click) 367932 293404 39 532 0 0% 0 0 13.606603
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.710261
lee (click) 328597 251497 50 1107 0 0% 0 0 30.419181
matmul (click) 11076 4720 8 137 0 0% 0 0 4.157344
nbody (click) 14448 21176 6 251 0 0% 0 0 6.165932
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.225031
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 107.140705
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.615685
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.573918
rack (click) 295561 283568 35 581 0 0% 0 0 14.944841
ruby-json (click) 19495 17440 8 211 0 0% 0 0 5.878378
rubyboy (click) 677451 634350 154 6525 42 0% 0 0 163.693732
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.434405
splay (click) 34536 22516 9 175 0 0% 0 0 5.166013
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.729609
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.950151
tinygql (click) 311918 270392 59 1041 5 0% 0 0 26.986106
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1868.91806
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 477.193998
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4961.5542
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.083559
block_methods (click) 25722 18873 26 310 0 0% 0 0 8.710687
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.525817
fib (click) 2659 2995 3 30 0 0% 0 0 1.13535
getivar (click) 3789 6778 3 79 0 0% 0 0 1.941216
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.341642
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818614
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.910297
object-new (click) 2352 2825 2 38 0 0% 0 0 1.008683
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.28128
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.798784
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.14298
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.835697
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.795917
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.352203
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.76009
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.060067
setivar (click) 2783 3726 3 46 0 0% 0 0 1.281433
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.423227
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.715911
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.42855
struct-new-no-escape (click) 2828 3378 3 43 0 0% 0 0 1.281953
structaref (click) 4407 9095 3 88 0 0% 0 0 2.355781
structaset (click) 3693 5870 3 66 0 0% 0 0 1.697236
throw (click) 5953 4624 5 53 0 0% 0 0 1.769047

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.