Ruby Benchmarks

Details for Benchmarks at 2026-07-16 00:52:29 UTC

YJIT metrics from the ruby-bench suite using Ruby 53dbc939ed.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.8% faster than CRuby 4.1.0dev
  • 4.9% faster than YJIT 3.4.7
On railsbench it is
  • 107.7% faster than CRuby 4.1.0dev
  • 9.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 20 minutes
aarch64 runtime: 8 hours, 4 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 198
chunky-png 5 32 5 30 50 34 50 24
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 440 50 625 50 666
liquid-compile 5 416 5 510 50 583 50 827
liquid-il 5 67 5 68 50 116 50 124
liquid-render 5 170 5 173 50 431 50 462
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 253 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 155 50 248 50 238
ruby-lsp 5 164 5 159 50 240 50 224
sequel 5 428 5 470 50 589 50 667
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 30 50 12 50 16
addressable-getters 5 165 5 171 50 183 50 203
addressable-join 5 74 5 84 50 66 50 79
addressable-merge 5 160 5 155 50 222 50 226
addressable-new 5 354 5 347 50 521 50 504
addressable-normalize 5 53 5 58 50 60 50 68
addressable-parse 5 104 5 106 50 104 50 113
addressable-setters 5 185 5 185 50 234 50 243
addressable-to-s 5 164 5 170 50 182 50 201
binarytrees 5 82 5 88 50 136 50 170
blurhash 5 84 5 84 50 145 50 145
erubi 5 137 5 156 50 138 50 160
etanni 5 100 5 81 50 72 50 47
fannkuchredux 5 55 5 57 50 99 50 110
fluentd 5 62 5 58 50 20 50 28
gcbench 5 10 5 10 50 10 50 10
graphql 5 359 5 454 50 532 50 902
graphql-native 5 57 5 85 50 21 50 61
knucleotide 5 163 5 141 50 118 50 94
lee 5 23 5 32 50 10 50 21
matmul 5 53 5 52 50 88 50 99
nbody 5 250 5 247 50 662 50 691
nqueens 5 119 5 124 50 554 50 606
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 179 50 697 50 680
protoboeuf-encode 5 201 5 201 50 802 50 808
rack 5 438 5 457 50 712 50 745
ruby-json 5 83 5 113 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 202 50 250 50 238
string_malloc_pressure 5 145 5 34 50 101 50 10
sudoku 5 47 5 50 50 155 50 163
tinygql 5 41 5 42 50 40 50 51
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 455 50 457
attr_accessor 5 156 5 178 50 1835 50 1882
cfunc_itself 5 348 5 313 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 211 5 309 50 2305 50 2391
getivar-module 5 103 5 142 50 89 50 132
keyword_args 5 102 5 100 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 481 50 297 50 1532
object-new-initialize 5 169 5 256 50 259 50 528
object-new-no-escape 5 80 5 141 50 89 50 369
respond_to 5 138 5 121 50 3893 50 3897
ruby-xor 5 247 5 234 50 1305 50 1313
send_bmethod 5 117 5 115 50 5539 50 4525
send_cfunc_block 5 106 5 101 50 305 50 285
send_rubyfunc_block 5 196 5 211 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 298
setivar 5 359 5 350 50 4930 50 4926
setivar_object 5 341 5 272 50 764 50 585
setivar_young 5 341 5 271 50 809 50 580
str_concat 5 390 5 435 50 1200 50 1063
structaref 5 152 5 189 50 1801 50 1878
structaset 5 198 5 235 50 370 50 493
throw 5 1112 5 1321 50 1442 50 1758

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) 1562286 1361066 204 2675 0 0% 0 0 79.120545
chunky-png (click) 323018 290266 79 1372 1 0% 0 0 39.083187
erubi-rails (click) 1382418 1272066 268 3630 23 0% 0 0 94.022909
hexapdf (click) 1526556 1364319 593 15683 44 0% 0 0 422.985283
liquid-c (click) 562878 495248 114 2224 5 0% 0 0 59.008702
liquid-compile (click) 479225 389901 146 2679 2 0% 0 0 73.02787
liquid-il (click) 616300 544679 70 2717 0 0% 0 0 79.499005
liquid-render (click) 671743 613673 131 2943 8 0% 0 0 76.654972
lobsters (click) 8527382 7256246 3126 62994 125 0% 0 0 2020.369918
mail (click) 869701 808437 345 7654 40 0% 0 0 205.281826
psych-load (click) 290287 228575 60 820 2 0% 0 0 23.251163
railsbench (click) 3362698 2894331 1592 19739 105 0% 0 0 534.547325
rubocop (click) 5770234 4995737 3001 57003 130 0% 6 0 1714.054342
ruby-lsp (click) 1048262 927189 408 7414 47 0% 1 0 197.605675
sequel (click) 511483 424042 11 119 0 0% 0 0 3.803122
shipit (click) 6889140 5856428 3135 49958 147 0% 0 0 1618.536091
addressable-equality (click) 326141 294896 44 1381 1 0% 0 0 33.432184
addressable-getters (click) 283559 258557 26 863 0 0% 0 0 20.013712
addressable-join (click) 273852 216025 24 941 0 0% 0 0 22.714603
addressable-merge (click) 291937 248981 27 896 0 0% 0 0 21.40094
addressable-new (click) 266778 246445 21 563 0 0% 0 0 13.675407
addressable-normalize (click) 318057 293719 43 1327 1 0% 0 0 31.389653
addressable-parse (click) 286226 235822 26 880 0 0% 0 0 20.559501
addressable-setters (click) 264058 203919 20 582 0 0% 0 0 13.840176
addressable-to-s (click) 283838 267111 26 849 0 0% 0 0 20.171351
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.807965
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.928877
erubi (click) 249579 190298 6 134 0 0% 0 0 3.82996
etanni (click) 32989 26478 8 114 0 0% 0 0 3.439123
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.826916
fluentd (click) 517811 455549 7 116 0 0% 0 0 3.618075
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.517182
graphql (click) 416293 389950 74 1939 19 0% 0 0 52.901694
graphql-native (click) 360085 324381 39 532 0 0% 0 0 13.560865
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.682655
lee (click) 322689 300279 50 1101 0 0% 0 0 30.529616
matmul (click) 11103 4709 8 136 0 0% 0 0 4.115564
nbody (click) 14448 21176 6 251 0 0% 0 0 6.227435
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.297826
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.464511
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.12456
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.58694
rack (click) 286703 263605 35 581 0 0% 0 0 14.534024
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.721981
rubyboy (click) 710342 675815 154 6871 42 0% 0 0 163.755623
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.324304
splay (click) 34682 14303 9 175 0 0% 0 0 5.612217
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.751436
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.858066
tinygql (click) 304638 284909 59 1024 5 0% 0 0 26.245669
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1859.998909
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 474.913691
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.09622
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.505995
fib (click) 2659 2995 3 30 0 0% 0 0 1.077936
getivar (click) 3789 6778 3 79 0 0% 0 0 1.927328
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334657
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807247
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.949669
object-new (click) 2406 2818 2 36 0 0% 0 0 1.00681
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.304332
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.763096
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.109315
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.777419
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.810501
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.314524
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.714074
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.085706
setivar (click) 2783 3726 3 46 0 0% 0 0 1.268174
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.430344
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.749332
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.533908
structaref (click) 4407 9095 3 88 0 0% 0 0 2.35292
structaset (click) 4113 5834 3 70 0 0% 0 0 1.78737
throw (click) 5953 4624 5 53 0 0% 0 0 1.768106

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.