Ruby Benchmarks

Details for Benchmarks at 2026-07-15 00:49:17 UTC

YJIT metrics from the ruby-bench suite using Ruby 6d6e9a93b1.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.8% faster than CRuby 4.1.0dev
  • 6.9% faster than YJIT 3.4.7
On railsbench it is
  • 116.5% faster than CRuby 4.1.0dev
  • 15.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 19 minutes
aarch64 runtime: 8 hours, 3 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 90 5 96 50 195 50 209
chunky-png 5 32 5 30 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 443 50 617 50 673
liquid-compile 5 418 5 515 50 579 50 833
liquid-il 5 67 5 68 50 116 50 122
liquid-render 5 171 5 173 50 432 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 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 154 50 247 50 242
ruby-lsp 5 158 5 160 50 229 50 230
sequel 5 427 5 465 50 598 50 669
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 17
addressable-getters 5 164 5 172 50 183 50 202
addressable-join 5 75 5 83 50 64 50 79
addressable-merge 5 161 5 158 50 221 50 225
addressable-new 5 351 5 345 50 518 50 508
addressable-normalize 5 52 5 58 50 60 50 69
addressable-parse 5 103 5 106 50 104 50 113
addressable-setters 5 185 5 185 50 233 50 244
addressable-to-s 5 164 5 172 50 182 50 203
binarytrees 5 82 5 88 50 136 50 169
blurhash 5 84 5 85 50 145 50 145
erubi 5 138 5 156 50 137 50 159
etanni 5 100 5 80 50 73 50 47
fannkuchredux 5 55 5 57 50 101 50 110
fluentd 5 58 5 62 50 23 50 27
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 465 50 564 50 895
graphql-native 5 58 5 88 50 21 50 62
knucleotide 5 163 5 139 50 117 50 94
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 52 50 87 50 99
nbody 5 250 5 251 50 663 50 644
nqueens 5 119 5 126 50 554 50 606
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 178 50 697 50 658
protoboeuf-encode 5 201 5 197 50 804 50 761
rack 5 442 5 483 50 709 50 791
ruby-json 5 84 5 113 50 50 50 90
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 207 50 250 50 238
string_malloc_pressure 5 148 5 34 50 103 50 10
sudoku 5 48 5 50 50 155 50 165
tinygql 5 41 5 44 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 454 50 459
attr_accessor 5 157 5 171 50 1831 50 1867
cfunc_itself 5 347 5 326 50 1255 50 1258
fib 5 125 5 110 50 939 50 940
getivar 5 215 5 313 50 2305 50 2424
getivar-module 5 103 5 142 50 89 50 266
keyword_args 5 102 5 100 50 1239 50 1242
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 477 50 298 50 1484
object-new-initialize 5 169 5 251 50 260 50 514
object-new-no-escape 5 80 5 140 50 89 50 358
respond_to 5 139 5 121 50 3902 50 3900
ruby-xor 5 247 5 239 50 1305 50 1311
send_bmethod 5 117 5 117 50 5539 50 4526
send_cfunc_block 5 106 5 109 50 303 50 299
send_rubyfunc_block 5 196 5 213 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 297
setivar 5 359 5 350 50 4930 50 4925
setivar_object 5 341 5 269 50 762 50 573
setivar_young 5 342 5 269 50 808 50 594
str_concat 5 391 5 428 50 1201 50 1056
structaref 5 153 5 179 50 1799 50 1857
structaset 5 197 5 226 50 368 50 483
throw 5 1108 5 1376 50 1441 50 1728

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) 1562757 1344504 204 2667 0 0% 0 0 73.490037
chunky-png (click) 323959 282542 79 1372 1 0% 0 0 37.809855
erubi-rails (click) 1382227 1173345 268 3630 23 0% 0 0 93.398727
hexapdf (click) 1528523 1301075 593 15681 44 0% 0 0 425.557747
liquid-c (click) 562878 503440 114 2224 5 0% 0 0 58.202179
liquid-compile (click) 482090 426502 146 2679 2 0% 0 0 73.092448
liquid-il (click) 618903 522682 70 2720 0 0% 0 0 79.525234
liquid-render (click) 671743 613673 131 2943 8 0% 0 0 76.679192
lobsters (click) 8515943 7278933 3126 62874 125 0% 0 0 1999.184698
mail (click) 868744 855968 345 7654 40 0% 0 0 205.845894
psych-load (click) 290287 228575 60 820 2 0% 0 0 22.886629
railsbench (click) 3362615 2910333 1592 19738 105 0% 0 0 535.557319
rubocop (click) 5769284 5010573 3001 57003 130 0% 6 0 1712.898555
ruby-lsp (click) 1038517 931872 408 7414 47 0% 1 0 196.943595
sequel (click) 511483 407626 11 119 0 0% 0 0 4.268353
shipit (click) 6857534 5822234 3135 49870 147 0% 0 0 1599.396378
addressable-equality (click) 325191 276876 44 1381 1 0% 0 0 32.951378
addressable-getters (click) 285469 268921 26 863 0 0% 0 0 20.251754
addressable-join (click) 291916 254571 24 941 0 0% 0 0 23.278756
addressable-merge (click) 290987 255517 27 896 0 0% 0 0 21.063696
addressable-new (click) 248066 199321 21 563 0 0% 0 0 13.493505
addressable-normalize (click) 321494 289864 43 1327 1 0% 0 0 31.940128
addressable-parse (click) 289136 247856 26 880 0 0% 0 0 21.118899
addressable-setters (click) 265725 230385 20 582 0 0% 0 0 13.934894
addressable-to-s (click) 286032 244940 26 849 0 0% 0 0 20.341917
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.741807
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.960378
erubi (click) 252484 235075 6 134 0 0% 0 0 3.79183
etanni (click) 32752 34339 8 114 0 0% 0 0 3.442174
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.806812
fluentd (click) 517811 455549 7 116 0 0% 0 0 3.587617
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.460342
graphql (click) 417370 366871 74 1939 19 0% 0 0 53.142792
graphql-native (click) 361119 300362 39 532 0 0% 0 0 13.343623
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.729306
lee (click) 322689 300279 50 1101 0 0% 0 0 30.639274
matmul (click) 11103 4709 8 136 0 0% 0 0 4.113238
nbody (click) 14448 21176 6 251 0 0% 0 0 6.139119
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.214711
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.475632
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 73.926662
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.590189
rack (click) 288893 241397 35 581 0 0% 0 0 14.548115
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.71047
rubyboy (click) 702862 634597 154 6871 42 0% 0 0 162.426545
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.164491
splay (click) 34682 14303 9 175 0 0% 0 0 5.476533
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.717239
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.902008
tinygql (click) 294545 272918 59 1024 5 0% 0 0 26.370253
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1864.384549
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 476.800344
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.086524
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.497532
fib (click) 2659 2995 3 30 0 0% 0 0 1.134832
getivar (click) 3789 6778 3 79 0 0% 0 0 1.911683
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.350265
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.792121
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.891773
object-new (click) 2406 2818 2 36 0 0% 0 0 1.012986
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.316897
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.693002
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.1249
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.791947
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.818141
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.268069
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.751687
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.081364
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251285
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.419569
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.737236
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.451053
structaref (click) 4407 9095 3 88 0 0% 0 0 2.344086
structaset (click) 4113 5834 3 70 0 0% 0 0 1.7507
throw (click) 5953 4624 5 53 0 0% 0 0 1.73033

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.