Ruby Benchmarks

Details for Benchmarks at 2026-06-20 01:24:00 UTC

YJIT metrics from the ruby-bench suite using Ruby 1165d7c6ba.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.1% faster than CRuby 4.1.0dev
  • 10.0% faster than YJIT 3.4.7
On railsbench it is
  • 118.5% faster than CRuby 4.1.0dev
  • 16.4% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 59 minutes
aarch64 runtime: 7 hours, 49 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 94 50 200 50 239
chunky-png 5 32 5 30 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 443 50 621 50 683
liquid-compile 5 421 5 514 50 582 50 839
liquid-render 5 172 5 173 50 431 50 467
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 254 50 306
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 154 50 248 50 248
ruby-lsp 5 162 5 162 50 224 50 232
sequel 5 425 5 459 50 601 50 664
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 19
addressable-getters 5 166 5 171 50 183 50 209
addressable-join 5 75 5 82 50 66 50 82
addressable-merge 5 160 5 159 50 223 50 244
addressable-new 5 353 5 343 50 521 50 538
addressable-normalize 5 53 5 58 50 60 50 72
addressable-parse 5 104 5 106 50 103 50 118
addressable-setters 5 185 5 188 50 233 50 257
addressable-to-s 5 164 5 171 50 181 50 206
binarytrees 5 82 5 87 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 138 5 151 50 139 50 155
etanni 5 100 5 80 50 73 50 48
fannkuchredux 5 55 5 57 50 99 50 105
fluentd 5 61 5 63 50 21 50 30
gcbench 5 10 5 10 50 10 50 16
graphql 5 373 5 447 50 572 50 983
graphql-native 5 59 5 86 50 21 50 66
knucleotide 5 163 5 142 50 117 50 96
lee 5 23 5 29 50 10 50 16
matmul 5 53 5 54 50 88 50 89
nbody 5 250 5 244 50 663 50 628
nqueens 5 119 5 129 50 554 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 697 50 809
protoboeuf-encode 5 201 5 200 50 803 50 790
rack 5 439 5 469 50 706 50 799
ruby-json 5 83 5 112 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 206 50 250 50 242
sudoku 5 48 5 50 50 155 50 157
tinygql 5 41 5 43 50 40 50 55
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 454 50 454
attr_accessor 5 157 5 192 50 1833 50 1908
cfunc_itself 5 347 5 333 50 1255 50 1258
fib 5 125 5 137 50 939 50 939
getivar 5 211 5 313 50 2305 50 2423
getivar-module 5 103 5 133 50 89 50 281
keyword_args 5 102 5 101 50 1236 50 1244
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 480 50 296 50 1449
object-new-initialize 5 169 5 233 50 259 50 978
object-new-no-escape 5 81 5 138 50 89 50 495
respond_to 5 139 5 123 50 3905 50 3895
ruby-xor 5 247 5 237 50 1305 50 1311
send_bmethod 5 118 5 110 50 5539 50 4526
send_cfunc_block 5 106 5 102 50 304 50 313
send_rubyfunc_block 5 195 5 192 50 1372 50 1372
setivar 5 359 5 382 50 4930 50 4959
setivar_object 5 341 5 306 50 763 50 656
setivar_young 5 341 5 306 50 808 50 683
str_concat 5 391 5 429 50 1201 50 1041
structaref 5 153 5 191 50 1751 50 1881
structaset 5 196 5 207 50 368 50 480
throw 5 1108 5 1380 50 1446 50 1802

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) 1564146 1302547 203 2669 0 0% 0 0 77.802065
chunky-png (click) 324444 297888 79 1376 1 0% 0 0 37.809482
erubi-rails (click) 1386604 1173488 268 3626 23 0% 0 0 93.827491
hexapdf (click) 1531659 1318057 593 15767 44 0% 0 0 423.118248
liquid-c (click) 567735 455014 114 2240 5 0% 0 0 58.518026
liquid-compile (click) 481739 413324 146 2669 2 0% 0 0 73.953437
liquid-render (click) 672863 584731 131 2963 8 0% 0 0 77.241879
lobsters (click) 8555306 7118070 3123 63308 122 0% 0 0 2118.384559
mail (click) 874278 881516 345 7738 40 0% 0 0 208.039911
psych-load (click) 291755 275690 61 829 2 0% 0 0 23.500771
railsbench (click) 3360393 2935354 1592 19741 105 0% 0 0 534.188659
rubocop (click) 5809928 5118672 3002 57381 127 0% 6 0 1719.973451
ruby-lsp (click) 1052933 957285 409 7470 47 0% 1 0 199.288626
sequel (click) 511413 463486 11 119 0 0% 0 0 4.29292
shipit (click) 6870541 5814374 3135 50080 147 0% 0 0 1588.622399
addressable-equality (click) 324557 283100 44 1380 1 0% 0 0 33.358483
addressable-getters (click) 285844 235915 26 863 0 0% 0 0 20.234498
addressable-join (click) 290268 259136 24 941 0 0% 0 0 22.733367
addressable-merge (click) 290299 269886 27 896 0 0% 0 0 21.293685
addressable-new (click) 265130 234626 21 563 0 0% 0 0 13.542905
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.78613
addressable-parse (click) 287606 252513 26 880 0 0% 0 0 21.019519
addressable-setters (click) 265320 236902 20 582 0 0% 0 0 13.891856
addressable-to-s (click) 282465 239129 26 849 0 0% 0 0 20.03719
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.774143
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.991905
erubi (click) 252242 241817 6 134 0 0% 0 0 3.817509
etanni (click) 32989 26478 8 114 0 0% 0 0 3.447711
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.79676
fluentd (click) 519223 455062 7 116 0 0% 0 0 3.674058
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.408242
graphql (click) 418351 373967 74 1940 19 0% 0 0 52.549636
graphql-native (click) 360669 337783 39 532 0 0% 0 0 13.55511
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.737907
lee (click) 322390 306895 50 1102 0 0% 0 0 30.326213
matmul (click) 11103 4709 8 136 0 0% 0 0 4.127691
nbody (click) 14448 21176 6 251 0 0% 0 0 6.135234
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.187072
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.283132
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.270925
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.79409
rack (click) 285274 235606 35 581 0 0% 0 0 14.539994
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.662101
rubyboy (click) 705590 678892 154 6871 42 0% 0 0 162.883238
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.69326
splay (click) 34617 22483 9 175 0 0% 0 0 5.238008
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.855749
tinygql (click) 304670 282971 59 1026 5 0% 0 0 26.206023
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.067066
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.39379
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.10186
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.489182
fib (click) 2659 2995 3 30 0 0% 0 0 1.10521
getivar (click) 3789 6778 3 79 0 0% 0 0 1.917397
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.302164
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.810314
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.933531
object-new (click) 2406 2818 2 36 0 0% 0 0 1.010058
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.30413
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.787304
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.128664
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.772797
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.80188
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.291987
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.730609
setivar (click) 2783 3726 3 46 0 0% 0 0 1.270285
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.418896
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.726022
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.474821
structaref (click) 4407 9095 3 88 0 0% 0 0 2.356758
structaset (click) 4113 5834 3 70 0 0% 0 0 1.771975
throw (click) 5953 4624 5 53 0 0% 0 0 1.77783

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.