Ruby Benchmarks

Details for Benchmarks at 2026-07-17 00:55:24 UTC

YJIT metrics from the ruby-bench suite using Ruby 3a2434c9d3.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.0% faster than CRuby 4.1.0dev
  • 5.6% faster than YJIT 3.4.7
On railsbench it is
  • 107.6% faster than CRuby 4.1.0dev
  • 10.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 9 minutes
aarch64 runtime: 7 hours, 53 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 96 50 196 50 210
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 439 50 623 50 663
liquid-compile 5 420 5 516 50 544 50 823
liquid-il 5 66 5 68 50 116 50 125
liquid-render 5 170 5 172 50 431 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 253 50 290
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 242
ruby-lsp 5 164 5 159 50 224 50 215
sequel 5 428 5 463 50 598 50 660
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 17
addressable-getters 5 165 5 169 50 183 50 202
addressable-join 5 74 5 84 50 66 50 77
addressable-merge 5 161 5 158 50 223 50 227
addressable-new 5 353 5 346 50 517 50 505
addressable-normalize 5 53 5 58 50 60 50 68
addressable-parse 5 104 5 105 50 103 50 113
addressable-setters 5 185 5 183 50 235 50 245
addressable-to-s 5 164 5 169 50 182 50 201
binarytrees 5 82 5 88 50 136 50 170
blurhash 5 84 5 84 50 145 50 145
erubi 5 140 5 152 50 129 50 155
etanni 5 101 5 79 50 72 50 47
fannkuchredux 5 55 5 58 50 100 50 112
fluentd 5 59 5 59 50 20 50 25
gcbench 5 10 5 10 50 10 50 10
graphql 5 360 5 461 50 567 50 896
graphql-native 5 57 5 85 50 22 50 58
knucleotide 5 163 5 143 50 117 50 97
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 52 50 87 50 98
nbody 5 250 5 246 50 663 50 689
nqueens 5 119 5 122 50 554 50 603
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 698 50 677
protoboeuf-encode 5 201 5 202 50 798 50 803
rack 5 441 5 460 50 719 50 746
ruby-json 5 83 5 112 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 236 50 250 50 231
string_malloc_pressure 5 147 5 33 50 102 50 10
sudoku 5 47 5 50 50 154 50 164
tinygql 5 41 5 44 50 40 50 51
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 449 50 446
attr_accessor 5 156 5 160 50 1833 50 1847
cfunc_itself 5 348 5 329 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 195 5 299 50 2305 50 2412
getivar-module 5 103 5 137 50 89 50 131
keyword_args 5 102 5 96 50 1239 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 481 50 297 50 1533
object-new-initialize 5 168 5 254 50 259 50 528
object-new-no-escape 5 80 5 141 50 89 50 370
respond_to 5 139 5 127 50 3900 50 3891
ruby-xor 5 247 5 237 50 1305 50 1313
send_bmethod 5 118 5 115 50 5539 50 4525
send_cfunc_block 5 107 5 102 50 308 50 291
send_rubyfunc_block 5 196 5 211 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 349 50 4931 50 4923
setivar_object 5 341 5 271 50 762 50 584
setivar_young 5 341 5 261 50 810 50 577
str_concat 5 391 5 425 50 1200 50 1076
structaref 5 153 5 166 50 1798 50 1830
structaset 5 197 5 234 50 371 50 488
throw 5 1107 5 1328 50 1444 50 1716

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) 1562550 1360976 204 2674 0 0% 0 0 74.037031
chunky-png (click) 323292 290514 79 1372 1 0% 0 0 37.968025
erubi-rails (click) 1384010 1151245 268 3630 23 0% 0 0 94.022077
hexapdf (click) 1528644 1292923 593 15682 44 0% 0 0 422.542932
liquid-c (click) 560968 476692 114 2224 5 0% 0 0 58.501047
liquid-compile (click) 480180 424330 146 2679 2 0% 0 0 73.006522
liquid-il (click) 616110 552823 70 2714 0 0% 0 0 79.560976
liquid-render (click) 653682 616034 131 2943 8 0% 0 0 76.999385
lobsters (click) 8532759 7285569 3126 63052 125 0% 0 0 2020.17244
mail (click) 869701 808437 345 7654 40 0% 0 0 206.010209
psych-load (click) 288102 258943 60 820 2 0% 0 0 23.020677
railsbench (click) 3361279 2818814 1592 19737 105 0% 0 0 535.518049
rubocop (click) 5770201 4995676 3001 57005 129 0% 6 0 1719.571042
ruby-lsp (click) 1048214 853478 408 7414 47 0% 1 0 197.956653
sequel (click) 511483 432202 11 119 0 0% 0 0 3.829158
shipit (click) 7042086 6056704 3129 49842 147 0% 0 0 1584.923026
addressable-equality (click) 307429 264156 44 1381 1 0% 0 0 33.144461
addressable-getters (click) 267712 231630 26 863 0 0% 0 0 19.984077
addressable-join (click) 289722 268550 24 941 0 0% 0 0 23.086141
addressable-merge (click) 289748 271137 27 896 0 0% 0 0 21.678389
addressable-new (click) 248066 199321 21 563 0 0% 0 0 13.331412
addressable-normalize (click) 319305 295656 43 1327 1 0% 0 0 31.792158
addressable-parse (click) 289136 247856 26 880 0 0% 0 0 21.090817
addressable-setters (click) 264779 238129 20 582 0 0% 0 0 14.078189
addressable-to-s (click) 283838 267111 26 849 0 0% 0 0 20.054978
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.769542
blurhash (click) 52495 43786 27 607 0 0% 0 0 18.028263
erubi (click) 234429 180150 6 134 0 0% 0 0 4.01367
etanni (click) 32989 26478 8 114 0 0% 0 0 3.436776
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.901301
fluentd (click) 518658 456340 7 116 0 0% 0 0 3.61048
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.515455
graphql (click) 419153 369182 74 1939 19 0% 0 0 53.044643
graphql-native (click) 360085 324381 39 532 0 0% 0 0 13.600899
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.713553
lee (click) 322689 300279 50 1101 0 0% 0 0 30.817372
matmul (click) 11103 4709 8 136 0 0% 0 0 4.142295
nbody (click) 14448 21176 6 251 0 0% 0 0 6.12075
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.232465
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.506141
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.153429
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.543252
rack (click) 288893 257813 35 581 0 0% 0 0 14.555878
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.816255
rubyboy (click) 713258 605969 154 6871 42 0% 0 0 163.778803
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.562513
splay (click) 34682 14303 9 175 0 0% 0 0 5.564464
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.759417
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.08785
tinygql (click) 304633 284909 59 1024 5 0% 0 0 26.076676
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1875.285811
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 474.58142
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.105716
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.519219
fib (click) 2659 2995 3 30 0 0% 0 0 1.072479
getivar (click) 3789 6778 3 79 0 0% 0 0 1.94497
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.370465
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.774567
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.902813
object-new (click) 2406 2818 2 36 0 0% 0 0 1.009402
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.288472
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.742084
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.114382
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.783615
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.849068
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.30996
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.737933
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.069821
setivar (click) 2783 3726 3 46 0 0% 0 0 1.250476
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.399737
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.754806
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.4576
structaref (click) 4407 9095 3 88 0 0% 0 0 2.347479
structaset (click) 4113 5834 3 70 0 0% 0 0 1.763579
throw (click) 5953 4624 5 53 0 0% 0 0 1.773553

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.