Ruby Benchmarks

Details for Benchmarks at 2026-09-10 01:00:26 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.5% faster than CRuby 4.1.0dev
  • 8.8% faster than YJIT 3.4.7
On railsbench it is
  • 113.8% faster than CRuby 4.1.0dev
  • 15.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 20 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 92 5 93 50 201 50 221
chunky-png 5 31 5 32 50 33 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 448 50 619 50 682
liquid-compile 5 420 5 527 50 550 50 849
liquid-il 5 67 5 70 50 116 50 132
liquid-render 5 171 5 173 50 431 50 472
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 254 50 294
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 162 50 246 50 256
ruby-lsp 5 159 5 164 50 240 50 238
sequel 5 428 5 460 50 593 50 649
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 176 50 184 50 213
addressable-join 5 75 5 87 50 66 50 86
addressable-merge 5 160 5 165 50 223 50 253
addressable-new 5 352 5 354 50 517 50 555
addressable-normalize 5 52 5 58 50 61 50 72
addressable-parse 5 103 5 111 50 104 50 122
addressable-setters 5 185 5 197 50 233 50 266
addressable-to-s 5 164 5 175 50 182 50 213
binarytrees 5 82 5 91 50 136 50 169
blurhash 5 84 5 87 50 145 50 145
erubi 5 140 5 151 50 131 50 156
etanni 5 100 5 82 50 72 50 50
fannkuchredux 5 55 5 57 50 100 50 110
fluentd 5 70 5 66 50 27 50 34
gcbench 5 10 5 11 50 10 50 16
grape 5 26 5 30 50 15 50 27
graphql 5 371 5 483 50 571 50 1001
graphql-native 5 57 5 88 50 21 50 69
knucleotide 5 163 5 155 50 117 50 108
lee 5 23 5 33 50 10 50 22
matmul 5 53 5 55 50 88 50 95
nbody 5 250 5 283 50 663 50 643
nqueens 5 119 5 124 50 555 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 189 50 696 50 800
protoboeuf-encode 5 201 5 205 50 790 50 807
rack 5 443 5 461 50 715 50 743
ruby-json 5 84 5 114 50 49 50 90
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 225 50 250 50 274
string_malloc_pressure 5 147 5 33 50 101 50 10
sudoku 5 48 5 49 50 155 50 165
tinygql 5 42 5 45 50 36 50 57
30k_ifelse 5 28 5 29 50 186 50 185
30k_methods 5 38 5 39 50 458 50 455
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 157 5 188 50 1834 50 1905
cfunc_itself 5 349 5 364 50 1255 50 1258
fib 5 125 5 140 50 939 50 939
getivar 5 211 5 311 50 2316 50 2422
getivar-module 5 100 5 136 50 88 50 122
keyword_args 5 102 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 662 50 297 50 1558
object-new-initialize 5 169 5 274 50 260 50 1025
object-new-no-escape 5 80 5 153 50 90 50 543
respond_to 5 139 5 128 50 3902 50 3900
ruby-xor 5 247 5 251 50 1305 50 1301
send_bmethod 5 117 5 118 50 5539 50 4527
send_cfunc_block 5 107 5 106 50 305 50 287
send_rubyfunc_block 5 195 5 207 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 713
setivar_young 5 341 5 287 50 809 50 735
str_concat 5 390 5 428 50 1196 50 893
structaref 5 153 5 188 50 1800 50 1879
structaset 5 198 5 258 50 370 50 497
throw 5 1108 5 1407 50 1444 50 1895

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) 1566702 1373969 203 2610 0 0% 0 0 76.745542
chunky-png (click) 331819 327056 79 1378 1 0% 0 0 38.143222
erubi-rails (click) 1394908 1241199 268 3636 23 0% 0 0 93.381249
hexapdf (click) 1534432 1362127 593 15773 45 0% 0 0 424.631886
liquid-c (click) 569460 504457 113 2235 5 0% 0 0 61.878889
liquid-compile (click) 482531 395808 146 2677 2 0% 0 0 73.045281
liquid-il (click) 603168 499609 70 2734 0 0% 0 0 79.205324
liquid-render (click) 675697 595061 130 2957 8 0% 0 0 77.125139
lobsters (click) 8557518 7147724 3126 63517 125 0% 0 0 2019.665886
mail (click) 865288 853416 345 7750 40 0% 0 0 207.444056
psych-load (click) 297083 287418 60 836 2 0% 0 0 23.286094
railsbench (click) 3406036 2980350 1591 19815 105 0% 0 0 568.817146
rubocop (click) 5769237 4947114 3000 57135 133 0% 6 0 1609.593826
ruby-lsp (click) 1060117 914433 408 7484 47 0% 1 0 198.37567
sequel (click) 532424 460949 11 119 0 0% 0 0 4.069415
shipit (click) 6922173 5789332 3137 50463 147 0% 0 0 1596.031322
addressable-equality (click) 330313 293225 44 1382 1 0% 0 0 32.606246
addressable-getters (click) 274812 258392 26 863 0 0% 0 0 20.183129
addressable-join (click) 299233 216014 24 941 0 0% 0 0 23.093625
addressable-merge (click) 299314 243139 27 896 0 0% 0 0 21.444082
addressable-new (click) 270977 212006 21 564 0 0% 0 0 13.600487
addressable-normalize (click) 328839 284102 43 1328 1 0% 0 0 31.988933
addressable-parse (click) 296508 233871 26 880 0 0% 0 0 21.253735
addressable-setters (click) 274340 210160 20 582 0 0% 0 0 14.30614
addressable-to-s (click) 293404 214571 26 849 0 0% 0 0 20.264161
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.829093
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.822231
erubi (click) 252407 220665 6 135 0 0% 0 0 3.8938
etanni (click) 29821 22968 8 114 0 0% 0 0 3.458659
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.849616
fluentd (click) 526755 510304 7 116 0 0% 0 0 3.566067
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.435422
grape (click) 773713 631954 89 1021 0 0% 0 0 25.726878
graphql (click) 425947 387625 74 1944 18 0% 0 0 52.655235
graphql-native (click) 369264 295595 39 532 0 0% 0 0 13.459659
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.64168
lee (click) 312212 248256 50 1107 0 0% 0 0 30.65725
matmul (click) 11076 4720 8 137 0 0% 0 0 4.177542
nbody (click) 14448 21176 6 251 0 0% 0 0 6.124522
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.196764
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 106.68312
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.109646
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.202994
rack (click) 294856 275291 35 581 0 0% 0 0 15.115341
ruby-json (click) 19495 17440 8 211 0 0% 0 0 5.957406
rubyboy (click) 675776 681741 154 6525 42 0% 0 0 162.985084
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.117989
splay (click) 34536 22516 9 175 0 0% 0 0 5.226858
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.738385
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.815413
tinygql (click) 308045 274403 59 1041 5 0% 0 0 26.446061
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1854.381522
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 473.019551
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4962.583146
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.065609
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.496974
fib (click) 2659 2995 3 30 0 0% 0 0 1.121912
getivar (click) 3789 6778 3 79 0 0% 0 0 1.929198
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.294367
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.824247
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.988067
object-new (click) 2352 2825 2 38 0 0% 0 0 1.005609
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.283166
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.745367
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.119333
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.793045
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.809161
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.308476
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.760645
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.05022
setivar (click) 2783 3726 3 46 0 0% 0 0 1.2714
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.405185
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.696151
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.414124
structaref (click) 4407 9095 3 88 0 0% 0 0 2.326789
structaset (click) 4113 5834 3 70 0 0% 0 0 1.77992
throw (click) 5953 4624 5 53 0 0% 0 0 1.78729

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.