Ruby Benchmarks

Details for Benchmarks at 2026-08-09 00:36:13 UTC

YJIT metrics from the ruby-bench suite using Ruby 4afd86cdec.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.0% faster than CRuby 4.1.0dev
  • 6.9% faster than YJIT 3.4.7
On railsbench it is
  • 119.2% faster than CRuby 4.1.0dev
  • 15.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 7 minutes
aarch64 runtime: 7 hours, 48 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 98 50 193 50 203
chunky-png 5 31 5 32 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 421 5 443 50 616 50 659
liquid-compile 5 421 5 524 50 581 50 845
liquid-il 5 66 5 70 50 116 50 122
liquid-render 5 169 5 177 50 431 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 211 50 252 50 295
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 245 50 241
ruby-lsp 5 154 5 164 50 229 50 220
sequel 5 427 5 457 50 589 50 655
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 165 5 176 50 183 50 209
addressable-join 5 74 5 87 50 66 50 81
addressable-merge 5 161 5 161 50 221 50 227
addressable-new 5 352 5 357 50 517 50 521
addressable-normalize 5 52 5 58 50 60 50 70
addressable-parse 5 103 5 108 50 104 50 117
addressable-setters 5 184 5 195 50 233 50 252
addressable-to-s 5 164 5 175 50 183 50 208
binarytrees 5 82 5 85 50 136 50 164
blurhash 5 84 5 85 50 145 50 145
erubi 5 139 5 156 50 140 50 157
etanni 5 101 5 81 50 72 50 48
fannkuchredux 5 55 5 56 50 101 50 113
fluentd 5 62 5 74 50 27 50 45
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 482 50 565 50 883
graphql-native 5 58 5 84 50 22 50 60
knucleotide 5 163 5 153 50 117 50 108
lee 5 23 5 33 50 10 50 20
matmul 5 53 5 55 50 88 50 99
nbody 5 250 5 281 50 663 50 688
nqueens 5 119 5 128 50 554 50 595
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 190 50 696 50 660
protoboeuf-encode 5 200 5 205 50 794 50 805
rack 5 441 5 474 50 715 50 797
ruby-json 5 84 5 115 50 51 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 208 5 211 50 250 50 244
string_malloc_pressure 5 149 5 35 50 101 50 10
sudoku 5 48 5 49 50 155 50 174
tinygql 5 41 5 45 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 458 50 455
attr_accessor 5 157 5 207 50 1832 50 1934
cfunc_itself 5 331 5 358 50 1255 50 1258
fib 5 125 5 144 50 939 50 939
getivar 5 210 5 332 50 2308 50 2438
getivar-module 5 100 5 139 50 89 50 125
keyword_args 5 102 5 108 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 481 50 296 50 1478
object-new-initialize 5 168 5 260 50 259 50 527
object-new-no-escape 5 80 5 145 50 89 50 365
respond_to 5 139 5 134 50 3905 50 3905
ruby-xor 5 247 5 243 50 1306 50 1312
send_bmethod 5 117 5 121 50 5539 50 4528
send_cfunc_block 5 107 5 110 50 304 50 283
send_rubyfunc_block 5 195 5 217 50 1371 50 1375
send_rubyfunc_inline 5 30 5 37 50 298 50 297
setivar 5 359 5 348 50 4930 50 4924
setivar_object 5 341 5 285 50 762 50 716
setivar_young 5 349 5 285 50 810 50 699
str_concat 5 392 5 438 50 1196 50 991
structaref 5 153 5 203 50 1766 50 1900
structaset 5 198 5 268 50 368 50 490
throw 5 1111 5 1268 50 1446 50 1690

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) 1562438 1354931 204 2666 0 0% 0 0 74.733175
chunky-png (click) 322711 266514 79 1372 1 0% 0 0 37.985608
erubi-rails (click) 1382094 1215767 268 3630 23 0% 0 0 100.285906
hexapdf (click) 1523839 1321337 593 15682 45 0% 0 0 424.279051
liquid-c (click) 557912 482408 114 2226 5 0% 0 0 61.837338
liquid-compile (click) 460542 368558 146 2679 2 0% 0 0 73.278104
liquid-il (click) 614544 584635 70 2716 0 0% 0 0 79.456825
liquid-render (click) 668037 602311 131 2945 8 0% 0 0 77.367703
lobsters (click) 8518671 7205040 3126 62916 125 0% 0 0 2009.985533
mail (click) 864922 885956 345 7654 40 0% 0 0 205.868249
psych-load (click) 285567 273347 60 820 2 0% 0 0 22.482172
railsbench (click) 3359504 2793626 1591 19739 105 0% 0 0 570.001008
rubocop (click) 5765161 5018072 3000 57026 132 0% 6 0 1611.787102
ruby-lsp (click) 1042759 946200 408 7425 47 0% 1 0 196.885791
sequel (click) 522194 447737 11 119 0 0% 0 0 4.222425
shipit (click) 6884132 5916606 3137 50012 147 0% 0 0 1586.817359
addressable-equality (click) 322721 283615 44 1381 1 0% 0 0 32.921354
addressable-getters (click) 284214 236291 26 863 0 0% 0 0 20.576309
addressable-join (click) 288789 251818 24 941 0 0% 0 0 23.071942
addressable-merge (click) 288541 245965 27 896 0 0% 0 0 21.236621
addressable-new (click) 264568 228558 21 563 0 0% 0 0 13.600883
addressable-normalize (click) 318377 254328 43 1327 1 0% 0 0 31.706752
addressable-parse (click) 286926 254545 26 880 0 0% 0 0 21.255505
addressable-setters (click) 264763 222647 20 582 0 0% 0 0 14.108566
addressable-to-s (click) 282631 233747 26 849 0 0% 0 0 19.951511
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.720415
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.849718
erubi (click) 246525 245451 6 134 0 0% 0 0 4.04076
etanni (click) 33079 34728 8 114 0 0% 0 0 3.448551
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.842878
fluentd (click) 515420 462310 7 116 0 0% 0 0 3.579344
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.47999
graphql (click) 414360 381044 74 1939 18 0% 0 0 52.589762
graphql-native (click) 357459 346918 39 532 0 0% 0 0 13.502095
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.687702
lee (click) 319241 289261 50 1101 0 0% 0 0 30.391801
matmul (click) 11103 4709 8 136 0 0% 0 0 4.054699
nbody (click) 14448 21176 6 251 0 0% 0 0 6.184313
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.217189
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.532874
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 73.572
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.308959
rack (click) 285444 230347 35 581 0 0% 0 0 14.649535
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.862772
rubyboy (click) 709705 594666 154 6875 42 0% 0 0 163.31974
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.519329
splay (click) 34682 14303 9 175 0 0% 0 0 5.384261
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.79234
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.878015
tinygql (click) 300937 265323 59 1024 5 0% 0 0 26.310741
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1875.673454
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 477.403055
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.049886
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.499154
fib (click) 2659 2995 3 30 0 0% 0 0 1.101359
getivar (click) 3789 6778 3 79 0 0% 0 0 1.913091
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.274206
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.81417
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.919168
object-new (click) 2406 2818 2 36 0 0% 0 0 1.001706
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.28785
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.693431
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.125744
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.801472
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.823633
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.269392
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.736393
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.045838
setivar (click) 2783 3726 3 46 0 0% 0 0 1.24043
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.399441
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.711895
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.496559
structaref (click) 4407 9095 3 88 0 0% 0 0 2.320126
structaset (click) 4113 5834 3 70 0 0% 0 0 1.744616
throw (click) 5953 4624 5 53 0 0% 0 0 1.750164

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.