Ruby Benchmarks

Details for Benchmarks at 2026-08-25 00:33:59 UTC

YJIT metrics from the ruby-bench suite using Ruby 4ea554661a.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.0% faster than CRuby 4.1.0dev
  • 8.5% faster than YJIT 3.4.7
On railsbench it is
  • 115.6% faster than CRuby 4.1.0dev
  • 17.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 43 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 89 5 95 50 196 50 221
chunky-png 5 32 5 32 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 425 5 446 50 616 50 679
liquid-compile 5 417 5 520 50 583 50 845
liquid-il 5 67 5 68 50 117 50 132
liquid-render 5 170 5 177 50 436 50 473
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 212 50 253 50 297
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 248 50 245
ruby-lsp 5 158 5 163 50 224 50 234
sequel 5 418 5 468 50 568 50 658
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 176 50 184 50 210
addressable-join 5 75 5 83 50 66 50 83
addressable-merge 5 160 5 164 50 222 50 244
addressable-new 5 351 5 351 50 522 50 533
addressable-normalize 5 52 5 58 50 61 50 70
addressable-parse 5 104 5 111 50 104 50 119
addressable-setters 5 184 5 192 50 233 50 256
addressable-to-s 5 165 5 176 50 182 50 209
binarytrees 5 82 5 86 50 136 50 168
blurhash 5 84 5 87 50 145 50 145
erubi 5 138 5 149 50 138 50 149
etanni 5 100 5 78 50 71 50 45
fannkuchredux 5 55 5 56 50 101 50 113
fluentd 5 56 5 66 50 21 50 39
gcbench 5 10 5 10 50 10 50 16
graphql 5 367 5 483 50 569 50 979
graphql-native 5 57 5 88 50 22 50 68
knucleotide 5 163 5 151 50 117 50 107
lee 5 23 5 31 50 10 50 18
matmul 5 53 5 57 50 88 50 99
nbody 5 250 5 276 50 663 50 677
nqueens 5 119 5 127 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 186 50 696 50 796
protoboeuf-encode 5 200 5 207 50 790 50 818
rack 5 441 5 472 50 714 50 791
ruby-json 5 84 5 115 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 219 50 250 50 245
string_malloc_pressure 5 146 5 32 50 103 50 10
sudoku 5 48 5 49 50 155 50 171
tinygql 5 42 5 45 50 40 50 55
30k_ifelse 5 28 5 28 50 174 50 184
30k_methods 5 38 5 39 50 458 50 459
attr_accessor 5 156 5 212 50 1831 50 1942
cfunc_itself 5 346 5 352 50 1255 50 1258
fib 5 125 5 146 50 939 50 939
getivar 5 210 5 327 50 2315 50 2434
getivar-module 5 100 5 147 50 89 50 121
keyword_args 5 102 5 106 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 269 5 482 50 297 50 1493
object-new-initialize 5 169 5 261 50 260 50 1023
object-new-no-escape 5 81 5 141 50 89 50 534
respond_to 5 139 5 126 50 3904 50 3901
ruby-xor 5 247 5 247 50 1306 50 1299
send_bmethod 5 118 5 123 50 5538 50 4527
send_cfunc_block 5 107 5 112 50 304 50 302
send_rubyfunc_block 5 196 5 209 50 1371 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 297
setivar 5 359 5 349 50 4931 50 4924
setivar_object 5 341 5 286 50 761 50 783
setivar_young 5 341 5 286 50 809 50 818
str_concat 5 391 5 416 50 1195 50 934
structaref 5 153 5 199 50 1799 50 1904
structaset 5 198 5 210 50 370 50 490
throw 5 1110 5 1298 50 1447 50 1682

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) 1556346 1281646 203 2600 0 0% 0 0 76.375467
chunky-png (click) 323306 266166 79 1376 1 0% 0 0 37.959962
erubi-rails (click) 1380630 1178168 268 3626 23 0% 0 0 93.512229
hexapdf (click) 1527691 1332241 593 15740 45 0% 0 0 423.435051
liquid-c (click) 560837 499038 113 2224 5 0% 0 0 61.80442
liquid-compile (click) 477676 419809 146 2666 2 0% 0 0 72.581412
liquid-il (click) 614391 525996 70 2728 0 0% 0 0 79.689375
liquid-render (click) 667447 598088 130 2946 8 0% 0 0 77.172694
lobsters (click) 8546541 7229147 3126 63273 125 0% 0 0 2012.577064
mail (click) 870918 808045 345 7716 40 0% 0 0 206.896519
psych-load (click) 288009 266584 60 829 2 0% 0 0 23.151895
railsbench (click) 3350331 2902963 1591 19732 105 0% 0 0 533.450507
rubocop (click) 5763356 4999467 3000 57026 132 0% 6 0 1611.45507
ruby-lsp (click) 1049460 922737 408 7449 47 0% 1 0 198.043072
sequel (click) 523029 480779 11 119 0 0% 0 0 4.225144
shipit (click) 7066718 6095698 3130 50230 147 0% 0 0 1642.460153
addressable-equality (click) 323653 284201 44 1381 1 0% 0 0 33.182413
addressable-getters (click) 283936 251675 26 863 0 0% 0 0 20.319987
addressable-join (click) 286517 264699 24 941 0 0% 0 0 22.671712
addressable-merge (click) 289459 262818 27 896 0 0% 0 0 21.434563
addressable-new (click) 264290 227558 21 563 0 0% 0 0 13.508987
addressable-normalize (click) 319011 295558 43 1327 1 0% 0 0 31.653208
addressable-parse (click) 286648 253545 26 880 0 0% 0 0 20.958947
addressable-setters (click) 264480 238026 20 582 0 0% 0 0 13.843843
addressable-to-s (click) 283265 242229 26 849 0 0% 0 0 19.809479
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.777366
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.812619
erubi (click) 246908 221260 6 134 0 0% 0 0 3.843187
etanni (click) 30080 23270 8 114 0 0% 0 0 3.440232
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.858988
fluentd (click) 512953 425582 7 116 0 0% 0 0 3.61249
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.486673
graphql (click) 415110 380153 74 1940 18 0% 0 0 52.65828
graphql-native (click) 356207 335168 39 532 0 0% 0 0 13.702382
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.811259
lee (click) 319350 313239 50 1102 0 0% 0 0 30.28509
matmul (click) 11103 4709 8 136 0 0% 0 0 4.079472
nbody (click) 14448 21176 6 251 0 0% 0 0 6.107407
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.185637
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.855576
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.292534
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.245984
rack (click) 285516 278947 35 581 0 0% 0 0 14.473213
ruby-json (click) 20067 18091 8 210 0 0% 0 0 5.759848
rubyboy (click) 669864 573422 154 6524 42 0% 0 0 162.538515
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.675806
splay (click) 34617 22483 9 175 0 0% 0 0 5.185863
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.730092
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.865464
tinygql (click) 302488 257807 59 1026 5 0% 0 0 26.335828
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1869.674027
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.140927
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.085005
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.518641
fib (click) 2659 2995 3 30 0 0% 0 0 1.11118
getivar (click) 3789 6778 3 79 0 0% 0 0 1.884173
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.335654
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.847895
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.9485
object-new (click) 2406 2818 2 36 0 0% 0 0 0.993541
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.293265
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.764784
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.12246
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799793
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.812693
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.302801
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.746465
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.059315
setivar (click) 2783 3726 3 46 0 0% 0 0 1.268467
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.419607
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.72189
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.431315
structaref (click) 4407 9095 3 88 0 0% 0 0 2.30975
structaset (click) 4113 5834 3 70 0 0% 0 0 1.769208
throw (click) 5953 4624 5 53 0 0% 0 0 1.761749

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.