Ruby Benchmarks

Details for Benchmarks at 2026-08-05 00:50:25 UTC

YJIT metrics from the ruby-bench suite using Ruby 022c795ac7.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.0% faster than CRuby 4.1.0dev
  • 6.7% faster than YJIT 3.4.7
On railsbench it is
  • 111.7% faster than CRuby 4.1.0dev
  • 13.6% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 8 minutes
aarch64 runtime: 7 hours, 50 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 97 50 203 50 211
chunky-png 5 32 5 31 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 439 50 622 50 661
liquid-compile 5 420 5 517 50 582 50 833
liquid-il 5 66 5 69 50 116 50 123
liquid-render 5 170 5 175 50 433 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 210 50 253 50 293
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 247 50 238
ruby-lsp 5 153 5 162 50 223 50 226
sequel 5 424 5 464 50 591 50 662
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 164 5 171 50 184 50 206
addressable-join 5 74 5 84 50 65 50 81
addressable-merge 5 161 5 158 50 222 50 229
addressable-new 5 353 5 345 50 517 50 513
addressable-normalize 5 52 5 59 50 60 50 69
addressable-parse 5 103 5 106 50 104 50 117
addressable-setters 5 185 5 185 50 233 50 248
addressable-to-s 5 164 5 171 50 182 50 205
binarytrees 5 82 5 88 50 136 50 169
blurhash 5 84 5 82 50 145 50 145
erubi 5 140 5 154 50 141 50 158
etanni 5 100 5 80 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 113
fluentd 5 62 5 62 50 20 50 29
gcbench 5 10 5 10 50 10 50 10
graphql 5 369 5 470 50 568 50 888
graphql-native 5 58 5 87 50 22 50 56
knucleotide 5 163 5 148 50 118 50 101
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 52 50 88 50 99
nbody 5 249 5 239 50 663 50 686
nqueens 5 119 5 124 50 554 50 596
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 696 50 683
protoboeuf-encode 5 201 5 201 50 792 50 831
rack 5 445 5 477 50 723 50 781
ruby-json 5 84 5 112 50 51 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 204 50 250 50 232
string_malloc_pressure 5 148 5 32 50 104 50 10
sudoku 5 48 5 50 50 155 50 174
tinygql 5 40 5 44 50 36 50 51
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 456 50 453
attr_accessor 5 157 5 170 50 1834 50 1869
cfunc_itself 5 348 5 327 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 211 5 295 50 2305 50 2410
getivar-module 5 103 5 133 50 89 50 121
keyword_args 5 102 5 111 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 478 50 299 50 1478
object-new-initialize 5 169 5 255 50 260 50 517
object-new-no-escape 5 81 5 139 50 89 50 364
respond_to 5 139 5 123 50 3901 50 3894
ruby-xor 5 247 5 239 50 1306 50 1312
send_bmethod 5 118 5 115 50 5538 50 4526
send_cfunc_block 5 106 5 109 50 306 50 318
send_rubyfunc_block 5 196 5 208 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 297
setivar 5 359 5 347 50 4930 50 4922
setivar_object 5 341 5 270 50 762 50 721
setivar_young 5 341 5 270 50 808 50 718
str_concat 5 392 5 442 50 1201 50 1069
structaref 5 153 5 170 50 1801 50 1842
structaset 5 198 5 215 50 370 50 488
throw 5 1110 5 1431 50 1447 50 1908

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) 1562975 1371522 204 2667 0 0% 0 0 73.848842
chunky-png (click) 307513 288203 79 1372 1 0% 0 0 38.403019
erubi-rails (click) 1380778 1148269 268 3630 23 0% 0 0 94.161455
hexapdf (click) 1506200 1300186 593 15681 45 0% 0 0 429.705332
liquid-c (click) 555614 479498 114 2226 5 0% 0 0 58.22043
liquid-compile (click) 478319 431392 146 2679 2 0% 0 0 73.088848
liquid-il (click) 614550 575145 70 2722 0 0% 0 0 79.734407
liquid-render (click) 666793 584063 131 2945 8 0% 0 0 77.341672
lobsters (click) 8518749 7187029 3125 62909 125 0% 0 0 2036.806201
mail (click) 866111 805554 345 7654 40 0% 0 0 205.650423
psych-load (click) 283599 262612 60 820 2 0% 0 0 22.410864
railsbench (click) 3356580 2953107 1591 19738 105 0% 0 0 532.818877
rubocop (click) 5762708 4998236 3000 57026 132 0% 6 0 1613.563653
ruby-lsp (click) 1046115 934147 408 7425 47 0% 1 0 197.142191
sequel (click) 523106 473583 11 119 0 0% 0 0 4.440328
shipit (click) 6890383 5925792 3135 50099 147 0% 0 0 1592.681768
addressable-equality (click) 323931 293393 44 1381 1 0% 0 0 33.472713
addressable-getters (click) 284214 236291 26 863 0 0% 0 0 20.289253
addressable-join (click) 288741 243240 24 941 0 0% 0 0 22.283276
addressable-merge (click) 286559 259718 27 896 0 0% 0 0 21.104587
addressable-new (click) 264568 228558 21 563 0 0% 0 0 13.627592
addressable-normalize (click) 319289 263790 43 1327 1 0% 0 0 31.758848
addressable-parse (click) 286926 254545 26 880 0 0% 0 0 21.09086
addressable-setters (click) 264763 222647 20 582 0 0% 0 0 14.134444
addressable-to-s (click) 283822 210669 26 849 0 0% 0 0 20.159886
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.807274
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.979631
erubi (click) 249993 225287 6 134 0 0% 0 0 3.806085
etanni (click) 33079 34728 8 114 0 0% 0 0 3.450821
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.898132
fluentd (click) 513966 460997 7 116 0 0% 0 0 3.642069
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.52188
graphql (click) 412331 362059 74 1939 18 0% 0 0 52.484912
graphql-native (click) 339628 317287 39 532 0 0% 0 0 13.491481
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.779544
lee (click) 319241 289261 50 1101 0 0% 0 0 30.452346
matmul (click) 11103 4709 8 136 0 0% 0 0 4.177831
nbody (click) 14448 21176 6 251 0 0% 0 0 6.08561
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.292141
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.769476
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.365057
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.337559
rack (click) 284479 277858 35 581 0 0% 0 0 14.495915
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.707332
rubyboy (click) 706537 598734 154 6875 42 0% 0 0 163.171095
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.3336
splay (click) 34682 14303 9 175 0 0% 0 0 5.250561
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.718879
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.951376
tinygql (click) 302142 266929 59 1024 5 0% 0 0 26.177468
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1872.67075
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 476.742339
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.087774
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.50983
fib (click) 2659 2995 3 30 0 0% 0 0 1.104032
getivar (click) 3789 6778 3 79 0 0% 0 0 1.921551
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.351143
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.795816
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.912906
object-new (click) 2406 2818 2 36 0 0% 0 0 0.994031
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.330322
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.71494
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.148193
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.827302
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.846113
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.335529
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.763214
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.095637
setivar (click) 2783 3726 3 46 0 0% 0 0 1.252946
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.383649
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.732908
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.469375
structaref (click) 4407 9095 3 88 0 0% 0 0 2.30637
structaset (click) 4113 5834 3 70 0 0% 0 0 1.767851
throw (click) 5953 4624 5 53 0 0% 0 0 1.782869

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.