Ruby Benchmarks

Details for Benchmarks at 2026-07-09 01:01:48 UTC

YJIT metrics from the ruby-bench suite using Ruby 583668d5ed.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.9% faster than CRuby 4.1.0dev
  • 10.1% faster than YJIT 3.4.7
On railsbench it is
  • 120.3% faster than CRuby 4.1.0dev
  • 17.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 13 minutes
aarch64 runtime: 7 hours, 58 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 92 5 96 50 198 50 234
chunky-png 5 32 5 31 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 420 5 445 50 615 50 681
liquid-compile 5 417 5 514 50 578 50 841
liquid-render 5 173 5 173 50 430 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 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 153 5 154 50 246 50 246
ruby-lsp 5 153 5 157 50 240 50 230
sequel 5 418 5 470 50 596 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 164 5 172 50 183 50 207
addressable-join 5 74 5 85 50 64 50 84
addressable-merge 5 160 5 162 50 222 50 238
addressable-new 5 353 5 348 50 520 50 534
addressable-normalize 5 53 5 58 50 60 50 70
addressable-parse 5 104 5 108 50 103 50 118
addressable-setters 5 185 5 187 50 233 50 254
addressable-to-s 5 164 5 172 50 181 50 208
binarytrees 5 82 5 89 50 136 50 168
blurhash 5 84 5 84 50 145 50 145
erubi 5 139 5 153 50 141 50 163
etanni 5 100 5 81 50 72 50 49
fannkuchredux 5 55 5 57 50 100 50 115
fluentd 5 70 5 62 50 20 50 30
gcbench 5 10 5 10 50 10 50 17
graphql 5 369 5 456 50 570 50 968
graphql-native 5 58 5 90 50 21 50 69
knucleotide 5 163 5 142 50 117 50 95
lee 5 22 5 31 50 10 50 19
matmul 5 53 5 53 50 87 50 98
nbody 5 250 5 252 50 662 50 672
nqueens 5 119 5 126 50 554 50 602
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 187 50 698 50 816
protoboeuf-encode 5 200 5 201 50 798 50 757
rack 5 445 5 478 50 706 50 798
ruby-json 5 84 5 113 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 209 50 250 50 247
string_malloc_pressure 5 147 5 34 50 104 50 10
sudoku 5 48 5 50 50 155 50 166
tinygql 5 41 5 44 50 35 50 55
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 455 50 455
attr_accessor 5 157 5 173 50 1836 50 1877
cfunc_itself 5 346 5 334 50 1255 50 1258
fib 5 124 5 138 50 939 50 939
getivar 5 211 5 340 50 2314 50 2443
getivar-module 5 103 5 138 50 89 50 275
keyword_args 5 102 5 102 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 470 50 296 50 1449
object-new-initialize 5 169 5 267 50 259 50 982
object-new-no-escape 5 81 5 144 50 89 50 517
respond_to 5 139 5 118 50 3904 50 3894
ruby-xor 5 247 5 240 50 1305 50 1312
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 107 5 101 50 305 50 314
send_rubyfunc_block 5 196 5 197 50 1371 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 460 50 4931 50 5029
setivar_object 5 341 5 317 50 763 50 655
setivar_young 5 341 5 316 50 808 50 680
str_concat 5 390 5 436 50 1200 50 1069
structaref 5 153 5 178 50 1799 50 1869
structaset 5 198 5 227 50 368 50 493
throw 5 1106 5 1340 50 1447 50 1734

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) 1562473 1277059 204 2659 0 0% 0 0 77.362276
chunky-png (click) 325946 284246 79 1376 1 0% 0 0 37.800949
erubi-rails (click) 1383142 1171081 268 3626 23 0% 0 0 93.656188
hexapdf (click) 1532008 1368253 594 15751 44 0% 0 0 426.316577
liquid-c (click) 567278 503665 114 2240 5 0% 0 0 58.605577
liquid-compile (click) 483177 465267 146 2673 2 0% 0 0 73.165225
liquid-render (click) 673640 594291 131 2963 8 0% 0 0 77.445196
lobsters (click) 8569814 7259331 3125 63579 125 0% 0 0 2045.087779
mail (click) 875848 843540 345 7739 40 0% 0 0 207.162515
psych-load (click) 292535 237088 60 829 2 0% 0 0 23.677413
railsbench (click) 3357282 2852098 1592 19742 105 0% 0 0 532.667028
rubocop (click) 5793563 4921200 3001 57255 130 0% 6 0 1616.152807
ruby-lsp (click) 1041729 871258 408 7438 47 0% 1 0 198.158319
sequel (click) 511440 464019 11 119 0 0% 0 0 4.309485
shipit (click) 6872619 5806811 3136 49961 147 0% 0 0 1592.264107
addressable-equality (click) 322275 281036 44 1381 1 0% 0 0 32.99539
addressable-getters (click) 285089 219042 26 863 0 0% 0 0 20.343714
addressable-join (click) 291779 220918 24 941 0 0% 0 0 23.058841
addressable-merge (click) 291803 231663 27 896 0 0% 0 0 21.20873
addressable-new (click) 266639 212792 21 563 0 0% 0 0 13.470494
addressable-normalize (click) 320112 270643 43 1327 1 0% 0 0 31.752287
addressable-parse (click) 287806 237301 26 880 0 0% 0 0 20.934769
addressable-setters (click) 265638 213590 20 582 0 0% 0 0 14.043484
addressable-to-s (click) 266929 221294 26 849 0 0% 0 0 19.660006
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.73003
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.751942
erubi (click) 249067 238140 6 134 0 0% 0 0 3.959935
etanni (click) 32989 26478 8 114 0 0% 0 0 3.391814
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.839443
fluentd (click) 516351 460494 7 116 0 0% 0 0 3.569959
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.400635
graphql (click) 418858 383211 74 1940 19 0% 0 0 53.126539
graphql-native (click) 360870 346846 39 532 0 0% 0 0 13.703384
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.710362
lee (click) 322939 299824 50 1102 0 0% 0 0 30.423762
matmul (click) 11103 4709 8 136 0 0% 0 0 4.076185
nbody (click) 14448 21176 6 251 0 0% 0 0 6.112535
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.182087
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.588829
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.467455
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.837429
rack (click) 289104 257356 35 581 0 0% 0 0 14.530486
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.755514
rubyboy (click) 708120 641261 154 6871 42 0% 0 0 162.489286
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.260372
splay (click) 34617 22483 9 175 0 0% 0 0 5.452106
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.725146
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.698386
tinygql (click) 303927 274424 59 1026 5 0% 0 0 26.42509
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.650851
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.536027
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.083764
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.467481
fib (click) 2659 2995 3 30 0 0% 0 0 1.104749
getivar (click) 3789 6778 3 79 0 0% 0 0 1.910266
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.333099
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.764029
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.884933
object-new (click) 2406 2818 2 36 0 0% 0 0 0.992994
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.281549
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.736134
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.161379
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.762803
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.79641
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.270256
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.711327
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.068434
setivar (click) 2783 3726 3 46 0 0% 0 0 1.283666
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.369119
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.712027
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.4258
structaref (click) 4407 9095 3 88 0 0% 0 0 2.334854
structaset (click) 4113 5834 3 70 0 0% 0 0 1.797948
throw (click) 5953 4624 5 53 0 0% 0 0 1.7078

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.