Ruby Benchmarks

Details for Benchmarks at 2026-04-11 00:56:06 UTC

YJIT metrics from the ruby-bench suite using Ruby 044a43f42b.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.3% faster than CRuby 4.1.0dev
  • 7.5% faster than YJIT 3.4.7
On railsbench it is
  • 116.3% faster than CRuby 4.1.0dev
  • 13.7% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 minutes
aarch64 runtime: 7 hours, 51 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 201 50 229
chunky-png 5 32 5 30 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 437 50 625 50 659
liquid-compile 5 422 5 481 50 546 50 744
liquid-render 5 171 5 173 50 432 50 448
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 199 50 255 50 284
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 244 50 245
ruby-lsp 5 163 5 163 50 239 50 231
sequel 5 428 5 454 50 602 50 629
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 168 50 183 50 198
addressable-join 5 73 5 81 50 66 50 73
addressable-merge 5 161 5 154 50 222 50 221
addressable-new 5 355 5 342 50 520 50 524
addressable-normalize 5 53 5 55 50 61 50 59
addressable-parse 5 103 5 104 50 104 50 111
addressable-setters 5 185 5 177 50 233 50 232
addressable-to-s 5 164 5 168 50 182 50 197
binarytrees 5 82 5 84 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 138 5 152 50 141 50 155
etanni 5 100 5 80 50 72 50 46
fannkuchredux 5 55 5 56 50 100 50 102
fluentd 5 58 5 60 50 21 50 27
gcbench 5 10 5 10 50 10 50 15
graphql 5 361 5 450 50 566 50 950
graphql-native 5 57 5 89 50 21 50 68
knucleotide 5 163 5 143 50 118 50 97
lee 5 23 5 30 50 10 50 16
matmul 5 53 5 57 50 88 50 97
nbody 5 250 5 282 50 663 50 644
nqueens 5 119 5 122 50 554 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 181 50 697 50 794
protoboeuf-encode 5 200 5 193 50 800 50 798
rack 5 439 5 441 50 708 50 728
ruby-json 5 84 5 105 50 51 50 82
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 227 50 250 50 282
sudoku 5 48 5 49 50 155 50 159
tinygql 5 42 5 42 50 40 50 53
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 452 50 456
attr_accessor 5 157 5 178 50 1834 50 1888
cfunc_itself 5 347 5 313 50 1255 50 1259
fib 5 125 5 131 50 939 50 939
getivar 5 215 5 306 50 2315 50 2418
getivar-module 5 103 5 138 50 89 50 248
keyword_args 5 103 5 101 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 471 50 297 50 1518
object-new-initialize 5 169 5 255 50 259 50 1022
object-new-no-escape 5 80 5 134 50 89 50 507
respond_to 5 139 5 131 50 3901 50 3893
ruby-xor 5 247 5 233 50 1305 50 1310
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 107 5 107 50 306 50 307
send_rubyfunc_block 5 196 5 210 50 1372 50 1376
setivar 5 359 5 476 50 4930 50 5041
setivar_object 5 341 5 343 50 762 50 598
setivar_young 5 341 5 343 50 809 50 617
str_concat 5 390 5 451 50 1203 50 1176
structaref 5 153 5 184 50 1802 50 1870
structaset 5 199 5 228 50 368 50 479
throw 5 1107 5 1389 50 1442 50 1715

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) 1557490 1367955 203 2653 0 0% 0 0 73.243515
chunky-png (click) 321329 302699 79 1376 1 0% 0 0 37.947226
erubi-rails (click) 1377255 1259466 268 3626 23 0% 0 0 94.098474
hexapdf (click) 1535108 1346382 593 15778 44 0% 0 0 430.256187
liquid-c (click) 548003 405823 114 2240 5 0% 0 0 58.592851
liquid-compile (click) 487754 452600 146 2749 2 0% 0 0 84.572135
liquid-render (click) 668232 595526 131 2963 8 0% 0 0 77.415958
lobsters (click) 8586217 7365506 3125 63779 122 0% 0 0 2050.234128
mail (click) 876352 850882 345 7738 40 0% 0 0 209.072764
psych-load (click) 290958 250447 61 833 2 0% 0 0 23.683402
railsbench (click) 3355282 2812211 1592 19744 104 0% 0 0 536.289779
rubocop (click) 5789658 4971057 3002 57197 127 0% 6 0 1644.924853
ruby-lsp (click) 1047037 933138 409 7472 47 0% 1 0 198.674506
sequel (click) 505776 432274 11 121 0 0% 0 0 4.764297
shipit (click) 6884378 5770630 3136 50290 147 0% 0 0 1602.494374
addressable-equality (click) 321431 272212 44 1380 1 0% 0 0 36.000636
addressable-getters (click) 279977 229644 26 869 0 0% 0 0 22.177114
addressable-join (click) 289782 243546 24 1005 0 0% 0 0 27.505491
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 24.702888
addressable-new (click) 260492 213835 21 569 0 0% 0 0 14.46994
addressable-normalize (click) 316022 282543 43 1371 1 0% 0 0 35.204833
addressable-parse (click) 282968 223530 26 886 0 0% 0 0 22.925402
addressable-setters (click) 258426 221451 20 582 0 0% 0 0 15.958209
addressable-to-s (click) 279800 228653 26 853 0 0% 0 0 22.907145
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.754279
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.876293
erubi (click) 251950 200403 6 134 0 0% 0 0 3.907945
etanni (click) 32989 26478 8 114 0 0% 0 0 3.419095
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.799497
fluentd (click) 489491 420401 7 116 0 0% 0 0 3.558319
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.609318
graphql (click) 414863 369827 73 1931 19 0% 0 0 52.603952
graphql-native (click) 358270 335438 39 532 0 0% 0 0 13.77313
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.723618
lee (click) 317726 251772 49 1099 0 0% 0 0 29.970358
matmul (click) 11103 4709 8 136 0 0% 0 0 4.079416
nbody (click) 14448 21176 6 251 0 0% 0 0 6.138984
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.209135
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.893469
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.700909
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.203381
rack (click) 284314 266933 35 586 0 0% 0 0 16.349685
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.664029
rubyboy (click) 708873 666674 154 6871 42 0% 0 0 163.681552
rubykon (click) 148271 147165 138 2099 4 0% 0 0 54.943685
splay (click) 34953 22682 9 175 0 0% 0 0 5.131644
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.969896
tinygql (click) 304902 274818 59 1032 5 0% 0 0 26.768701
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.034989
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.665191
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.081167
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.519127
fib (click) 2659 2995 3 30 0 0% 0 0 1.052039
getivar (click) 3789 6778 3 79 0 0% 0 0 1.940667
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.337642
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.81862
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.880036
object-new (click) 2406 2818 2 36 0 0% 0 0 0.999801
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.278758
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.991243
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.116343
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.792408
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.817572
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.30006
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.757608
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251651
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.394041
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.727188
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.425814
structaref (click) 4407 9095 3 88 0 0% 0 0 2.347494
structaset (click) 4113 5834 3 70 0 0% 0 0 1.761805
throw (click) 5953 4624 5 53 0 0% 0 0 1.728502

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.