Ruby Benchmarks

Details for Benchmarks at 2026-09-19 01:00:16 UTC

YJIT metrics from the ruby-bench suite using Ruby d7fe390c85.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.0% faster than CRuby 4.1.0dev
  • 10.0% faster than YJIT 3.4.7
On railsbench it is
  • 115.1% faster than CRuby 4.1.0dev
  • 16.7% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 53 minutes
aarch64 runtime: 8 hours, 24 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 93 50 198 50 219
chunky-png 5 31 5 34 50 33 50 32
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 443 50 625 50 672
liquid-compile 5 417 5 520 50 582 50 849
liquid-il 5 66 5 70 50 115 50 132
liquid-render 5 171 5 173 50 431 50 470
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 211 50 252 50 294
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 247 50 254
ruby-lsp 5 158 5 163 50 226 50 235
sequel 5 422 5 459 50 589 50 643
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 176 50 183 50 215
addressable-join 5 75 5 83 50 66 50 84
addressable-merge 5 161 5 164 50 222 50 245
addressable-new 5 352 5 361 50 516 50 550
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 103 5 109 50 103 50 124
addressable-setters 5 184 5 195 50 233 50 257
addressable-to-s 5 163 5 176 50 182 50 214
binarytrees 5 81 5 90 50 136 50 170
blurhash 5 84 5 84 50 145 50 144
erubi 5 137 5 150 50 139 50 157
etanni 5 100 5 79 50 71 50 48
fannkuchredux 5 55 5 57 50 100 50 111
fluentd 5 69 5 74 50 27 50 34
gcbench 5 10 5 11 50 10 50 16
grape 5 27 5 29 50 15 50 28
graphql 5 370 5 462 50 569 50 986
graphql-native 5 57 5 90 50 21 50 70
knucleotide 5 163 5 152 50 117 50 106
lee 5 23 5 34 50 10 50 24
matmul 5 53 5 56 50 87 50 93
nbody 5 250 5 284 50 662 50 688
nqueens 5 119 5 127 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 187 50 694 50 819
protoboeuf-encode 5 201 5 206 50 792 50 804
rack 5 440 5 447 50 709 50 745
ruby-json 5 84 5 114 50 50 50 90
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 222 50 250 50 257
string_malloc_pressure 5 146 5 32 50 100 50 10
sudoku 5 48 5 50 50 154 50 163
tinygql 5 42 5 44 50 37 50 54
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 39 50 457 50 457
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 156 5 190 50 1832 50 1906
block_methods 5 10 5 10 50 10 50 10
cfunc_itself 5 348 5 343 50 1253 50 1253
fib 5 125 5 144 50 939 50 939
getivar 5 216 5 303 50 2304 50 2412
getivar-module 5 104 5 134 50 88 50 147
keyword_args 5 102 5 109 50 1236 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 662 50 296 50 1549
object-new-initialize 5 168 5 270 50 258 50 1015
object-new-no-escape 5 81 5 151 50 89 50 538
respond_to 5 139 5 128 50 3904 50 3900
ruby-xor 5 247 5 254 50 1302 50 1313
send_bmethod 5 117 5 117 50 5537 50 4525
send_cfunc_block 5 107 5 101 50 305 50 284
send_rubyfunc_block 5 195 5 192 50 1368 50 1374
send_rubyfunc_inline 5 30 5 37 50 297 50 297
setivar 5 359 5 349 50 4925 50 4924
setivar_object 5 341 5 287 50 764 50 714
setivar_young 5 342 5 286 50 810 50 734
str_concat 5 391 5 424 50 1200 50 953
struct-new-no-escape 5 148 5 211 50 151 50 328
structaref 5 153 5 191 50 1797 50 1877
structaset 5 198 5 272 50 369 50 2653
throw 5 1109 5 1340 50 1445 50 1718

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) 1579569 1294269 204 2674 0 0% 0 0 74.663525
chunky-png (click) 332524 294373 79 1378 1 0% 0 0 38.558714
erubi-rails (click) 1393689 1230852 268 3636 23 0% 0 0 94.150863
hexapdf (click) 1534402 1328173 593 15773 45 0% 0 0 425.830569
liquid-c (click) 570170 537315 113 2235 5 0% 0 0 62.652603
liquid-compile (click) 483402 420653 146 2677 2 0% 0 0 73.876213
liquid-il (click) 623503 547340 70 2737 0 0% 0 0 80.613919
liquid-render (click) 673395 550309 130 2957 8 0% 0 0 77.400088
lobsters (click) 8544822 7231769 3125 63413 124 0% 0 0 2022.184102
mail (click) 880997 855021 345 7750 40 0% 0 0 207.079278
psych-load (click) 297793 262972 60 836 2 0% 0 0 23.222941
railsbench (click) 3406490 3127519 1591 19815 105 0% 0 0 572.665609
rubocop (click) 5768556 4970018 3000 57133 134 0% 6 0 1615.684285
ruby-lsp (click) 1061431 940517 408 7496 47 0% 1 0 201.194831
sequel (click) 523449 422965 11 119 0 0% 0 0 4.446483
shipit (click) 6916880 5852031 3137 50345 147 0% 0 0 1607.246601
addressable-equality (click) 334191 231875 44 1382 1 0% 0 0 33.365155
addressable-getters (click) 294501 232106 26 863 0 0% 0 0 20.566993
addressable-join (click) 298973 239079 24 941 0 0% 0 0 22.954576
addressable-merge (click) 300019 235052 27 896 0 0% 0 0 21.758005
addressable-new (click) 273890 222768 21 564 0 0% 0 0 13.525325
addressable-normalize (click) 329544 235035 43 1328 1 0% 0 0 32.256065
addressable-parse (click) 294166 279207 26 880 0 0% 0 0 20.920973
addressable-setters (click) 275045 210265 20 582 0 0% 0 0 14.374749
addressable-to-s (click) 291057 268094 26 849 0 0% 0 0 19.951759
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.804723
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.95274
erubi (click) 253278 245510 6 135 0 0% 0 0 3.839218
etanni (click) 29821 22968 8 114 0 0% 0 0 3.451797
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.841402
fluentd (click) 528352 462047 7 116 0 0% 0 0 3.649386
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.461804
grape (click) 775383 625559 89 1021 0 0% 0 0 25.878894
graphql (click) 426657 371331 74 1944 18 0% 0 0 53.212748
graphql-native (click) 369969 287488 39 532 0 0% 0 0 13.677943
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.671686
lee (click) 328597 251497 50 1107 0 0% 0 0 30.432011
matmul (click) 11076 4720 8 137 0 0% 0 0 4.144688
nbody (click) 14448 21176 6 251 0 0% 0 0 6.151283
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.231391
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 107.758961
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.857364
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.714953
rack (click) 295561 283568 35 581 0 0% 0 0 15.039949
ruby-json (click) 19495 17440 8 211 0 0% 0 0 5.948373
rubyboy (click) 677451 634350 154 6525 42 0% 0 0 164.821566
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.683509
splay (click) 34536 22516 9 175 0 0% 0 0 5.250256
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.801343
sudoku (click) 51585 74062 7 873 0 0% 0 0 23.211809
tinygql (click) 311918 270392 59 1041 5 0% 0 0 26.982858
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1871.677536
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 478.935617
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4977.804888
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.084145
block_methods (click) 25722 18873 26 310 0 0% 0 0 8.770782
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.501651
fib (click) 2659 2995 3 30 0 0% 0 0 1.114936
getivar (click) 3789 6778 3 79 0 0% 0 0 1.931843
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.322365
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.781816
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.910233
object-new (click) 2352 2825 2 38 0 0% 0 0 1.028101
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.316593
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.780226
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.108071
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.828757
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.788223
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.291869
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.766993
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.059157
setivar (click) 2783 3726 3 46 0 0% 0 0 1.255067
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.428074
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.720533
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.467101
struct-new-no-escape (click) 2828 3378 3 43 0 0% 0 0 1.260221
structaref (click) 4407 9095 3 88 0 0% 0 0 2.358219
structaset (click) 3693 5870 3 66 0 0% 0 0 1.679029
throw (click) 5953 4624 5 53 0 0% 0 0 1.831158

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.