Ruby Benchmarks

Details for Benchmarks at 2026-07-26 00:59:52 UTC

YJIT metrics from the ruby-bench suite using Ruby 5f398e864a.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.8% faster than CRuby 4.1.0dev
  • 4.6% faster than YJIT 3.4.7
On railsbench it is
  • 106.1% faster than CRuby 4.1.0dev
  • 8.9% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 10 minutes
aarch64 runtime: 7 hours, 52 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 95 50 200 50 203
chunky-png 5 32 5 30 50 34 50 25
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 439 50 619 50 661
liquid-compile 5 420 5 517 50 583 50 825
liquid-il 5 67 5 68 50 117 50 124
liquid-render 5 170 5 173 50 433 50 464
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 207 50 254 50 289
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 247 50 240
ruby-lsp 5 158 5 155 50 220 50 221
sequel 5 428 5 459 50 599 50 666
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 12 50 17
addressable-getters 5 164 5 171 50 183 50 206
addressable-join 5 75 5 83 50 64 50 80
addressable-merge 5 162 5 159 50 223 50 230
addressable-new 5 353 5 342 50 521 50 507
addressable-normalize 5 53 5 57 50 60 50 70
addressable-parse 5 104 5 106 50 103 50 117
addressable-setters 5 185 5 186 50 231 50 251
addressable-to-s 5 164 5 171 50 182 50 204
binarytrees 5 82 5 89 50 136 50 169
blurhash 5 84 5 84 50 145 50 145
erubi 5 140 5 151 50 132 50 162
etanni 5 101 5 80 50 73 50 50
fannkuchredux 5 55 5 57 50 91 50 111
fluentd 5 56 5 58 50 21 50 27
gcbench 5 10 5 10 50 10 50 10
graphql 5 368 5 456 50 570 50 900
graphql-native 5 58 5 86 50 21 50 58
knucleotide 5 163 5 148 50 117 50 102
lee 5 23 5 32 50 10 50 20
matmul 5 53 5 52 50 87 50 97
nbody 5 250 5 250 50 663 50 683
nqueens 5 119 5 127 50 554 50 599
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 180 50 697 50 680
protoboeuf-encode 5 201 5 198 50 804 50 817
rack 5 441 5 455 50 716 50 747
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 205 50 250 50 235
string_malloc_pressure 5 146 5 34 50 102 50 10
sudoku 5 48 5 49 50 155 50 170
tinygql 5 41 5 41 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 38 5 39 50 457 50 457
attr_accessor 5 157 5 180 50 1832 50 1894
cfunc_itself 5 347 5 323 50 1255 50 1258
fib 5 124 5 135 50 939 50 939
getivar 5 215 5 326 50 2312 50 2437
getivar-module 5 103 5 146 50 89 50 114
keyword_args 5 102 5 104 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 479 50 298 50 1474
object-new-initialize 5 168 5 255 50 259 50 517
object-new-no-escape 5 80 5 140 50 89 50 363
respond_to 5 139 5 121 50 3902 50 3891
ruby-xor 5 247 5 242 50 1305 50 1299
send_bmethod 5 118 5 117 50 5539 50 4526
send_cfunc_block 5 107 5 103 50 305 50 282
send_rubyfunc_block 5 196 5 200 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 349 50 4930 50 4923
setivar_object 5 341 5 273 50 760 50 717
setivar_young 5 342 5 273 50 809 50 730
str_concat 5 390 5 438 50 1200 50 1079
structaref 5 154 5 178 50 1799 50 1889
structaset 5 198 5 239 50 370 50 498
throw 5 1108 5 1330 50 1442 50 1689

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) 1562542 1378438 204 2673 0 0% 0 0 74.362567
chunky-png (click) 322696 266514 79 1372 1 0% 0 0 38.019321
erubi-rails (click) 1379811 1187586 268 3630 23 0% 0 0 93.926503
hexapdf (click) 1524912 1330959 593 15681 45 0% 0 0 424.621679
liquid-c (click) 556186 488234 114 2226 5 0% 0 0 58.057836
liquid-compile (click) 478304 431392 146 2679 2 0% 0 0 72.134123
liquid-il (click) 614507 576382 70 2716 0 0% 0 0 79.002629
liquid-render (click) 668022 602311 131 2945 8 0% 0 0 76.885765
lobsters (click) 8514882 7113492 3126 62902 125 0% 0 0 2017.790407
mail (click) 862455 842008 345 7654 40 0% 0 0 204.944908
psych-load (click) 286757 283145 60 820 2 0% 0 0 22.918732
railsbench (click) 3356485 2895694 1591 19737 105 0% 0 0 533.473525
rubocop (click) 5763279 4950618 3000 57018 133 0% 6 0 1630.285369
ruby-lsp (click) 1046100 966951 408 7425 47 0% 1 0 196.338666
sequel (click) 523091 449039 11 119 0 0% 0 0 3.710332
shipit (click) 6859842 5853860 3136 49951 147 0% 0 0 1593.754923
addressable-equality (click) 321824 258283 44 1381 1 0% 0 0 33.27026
addressable-getters (click) 282107 242141 26 863 0 0% 0 0 20.130467
addressable-join (click) 285764 231982 24 941 0 0% 0 0 22.766556
addressable-merge (click) 289717 255655 27 896 0 0% 0 0 21.512986
addressable-new (click) 262643 226386 21 563 0 0% 0 0 13.477099
addressable-normalize (click) 315328 267187 43 1327 1 0% 0 0 31.20156
addressable-parse (click) 286911 254545 26 880 0 0% 0 0 21.052298
addressable-setters (click) 264748 222647 20 582 0 0% 0 0 14.108044
addressable-to-s (click) 281715 232903 26 849 0 0% 0 0 19.921269
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.770754
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.839115
erubi (click) 247113 246050 6 134 0 0% 0 0 3.917056
etanni (click) 33079 34728 8 114 0 0% 0 0 3.460563
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.816717
fluentd (click) 512419 491892 7 116 0 0% 0 0 3.572515
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.641769
graphql (click) 413366 363846 74 1939 18 0% 0 0 52.343572
graphql-native (click) 358633 340224 39 532 0 0% 0 0 13.583051
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.746134
lee (click) 315304 309110 50 1101 0 0% 0 0 30.43427
matmul (click) 11103 4709 8 136 0 0% 0 0 4.177655
nbody (click) 14448 21176 6 251 0 0% 0 0 6.108992
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.163435
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.37971
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.014401
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.344141
rack (click) 283514 244554 35 581 0 0% 0 0 14.537248
ruby-json (click) 19789 17789 8 206 0 0% 0 0 5.685073
rubyboy (click) 705982 622847 154 6871 42 0% 0 0 162.837831
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.508517
splay (click) 34682 14303 9 175 0 0% 0 0 5.330342
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.721456
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.822216
tinygql (click) 300217 272929 59 1024 5 0% 0 0 26.074191
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1868.22458
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 474.115764
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.088088
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.49487
fib (click) 2659 2995 3 30 0 0% 0 0 1.113849
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936577
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.24887
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.797283
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.900255
object-new (click) 2406 2818 2 36 0 0% 0 0 0.995324
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.30933
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.723929
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.136613
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.765054
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.792776
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.291893
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.759824
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.053661
setivar (click) 2783 3726 3 46 0 0% 0 0 1.256857
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.388431
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.729782
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.489606
structaref (click) 4407 9095 3 88 0 0% 0 0 2.333775
structaset (click) 4113 5834 3 70 0 0% 0 0 1.75227
throw (click) 5953 4624 5 53 0 0% 0 0 1.760612

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.