Ruby Benchmarks

Details for Benchmarks at 2026-08-12 00:40:45 UTC

YJIT metrics from the ruby-bench suite using Ruby 32035bdf80.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.1% faster than CRuby 4.1.0dev
  • 10.3% faster than YJIT 3.4.7
On railsbench it is
  • 114.6% faster than CRuby 4.1.0dev
  • 15.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 46 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 90 5 96 50 201 50 234
chunky-png 5 32 5 32 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 421 5 445 50 618 50 678
liquid-compile 5 420 5 524 50 583 50 843
liquid-il 5 66 5 70 50 116 50 136
liquid-render 5 173 5 175 50 433 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 213 50 253 50 296
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 156 50 247 50 245
ruby-lsp 5 158 5 163 50 224 50 244
sequel 5 419 5 465 50 600 50 661
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 19
addressable-getters 5 165 5 180 50 183 50 217
addressable-join 5 75 5 87 50 66 50 85
addressable-merge 5 161 5 166 50 223 50 251
addressable-new 5 353 5 364 50 520 50 558
addressable-normalize 5 52 5 59 50 60 50 72
addressable-parse 5 104 5 110 50 104 50 121
addressable-setters 5 185 5 193 50 233 50 263
addressable-to-s 5 165 5 177 50 183 50 215
binarytrees 5 82 5 93 50 136 50 145
blurhash 5 84 5 84 50 145 50 145
erubi 5 142 5 155 50 131 50 161
etanni 5 100 5 80 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 111
fluentd 5 60 5 75 50 20 50 32
gcbench 5 10 5 10 50 10 50 16
graphql 5 359 5 480 50 569 50 974
graphql-native 5 57 5 89 50 21 50 71
knucleotide 5 163 5 154 50 118 50 108
lee 5 23 5 32 50 10 50 20
matmul 5 53 5 53 50 88 50 97
nbody 5 250 5 245 50 663 50 700
nqueens 5 119 5 128 50 554 50 598
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 184 50 696 50 820
protoboeuf-encode 5 201 5 205 50 794 50 787
rack 5 450 5 483 50 720 50 810
ruby-json 5 83 5 114 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 214 50 247 50 250
string_malloc_pressure 5 145 5 36 50 102 50 10
sudoku 5 48 5 49 50 155 50 169
tinygql 5 42 5 45 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 40 50 458 50 452
attr_accessor 5 157 5 194 50 1834 50 1915
cfunc_itself 5 347 5 352 50 1255 50 1258
fib 5 125 5 141 50 939 50 937
getivar 5 215 5 336 50 2315 50 2443
getivar-module 5 103 5 145 50 87 50 122
keyword_args 5 102 5 105 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 60
object-new 5 268 5 483 50 297 50 1498
object-new-initialize 5 169 5 258 50 259 50 1023
object-new-no-escape 5 80 5 143 50 89 50 544
respond_to 5 139 5 129 50 3903 50 3903
ruby-xor 5 247 5 248 50 1305 50 1314
send_bmethod 5 117 5 123 50 5539 50 4527
send_cfunc_block 5 106 5 112 50 304 50 303
send_rubyfunc_block 5 196 5 209 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 298
setivar 5 359 5 349 50 4931 50 4924
setivar_object 5 345 5 286 50 765 50 710
setivar_young 5 345 5 287 50 810 50 737
str_concat 5 391 5 437 50 1201 50 1026
structaref 5 153 5 187 50 1803 50 1875
structaset 5 198 5 234 50 368 50 481
throw 5 1111 5 1416 50 1445 50 1869

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) 1564030 1353385 204 2708 0 0% 0 0 73.702605
chunky-png (click) 323272 274340 79 1376 1 0% 0 0 37.969961
erubi-rails (click) 1380171 1243044 268 3626 23 0% 0 0 99.561114
hexapdf (click) 1529252 1301167 594 15750 45 0% 0 0 422.875743
liquid-c (click) 560808 523596 113 2224 5 0% 0 0 61.276864
liquid-compile (click) 477637 427983 146 2666 2 0% 0 0 72.258336
liquid-il (click) 612054 531659 70 2727 0 0% 0 0 79.505882
liquid-render (click) 667129 606054 130 2946 8 0% 0 0 76.348535
lobsters (click) 8548161 7154788 3125 63246 125 0% 0 0 2008.695432
mail (click) 870610 791419 345 7716 40 0% 0 0 206.376671
psych-load (click) 287696 266318 60 829 2 0% 0 0 23.136956
railsbench (click) 3353186 3062025 1591 19737 105 0% 0 0 566.069067
rubocop (click) 5762600 5031477 3000 57026 132 0% 6 0 1604.539943
ruby-lsp (click) 1049430 898147 408 7449 47 0% 1 0 198.399989
sequel (click) 522995 472573 11 119 0 0% 0 0 4.113288
shipit (click) 6868419 5640047 3136 49974 147 0% 0 0 1585.094623
addressable-equality (click) 321623 298421 44 1381 1 0% 0 0 32.52581
addressable-getters (click) 283902 251657 26 863 0 0% 0 0 20.215196
addressable-join (click) 287443 266317 24 941 0 0% 0 0 22.138333
addressable-merge (click) 289425 262800 27 896 0 0% 0 0 21.282274
addressable-new (click) 263977 227332 21 563 0 0% 0 0 13.173515
addressable-normalize (click) 318972 279156 43 1327 1 0% 0 0 31.159344
addressable-parse (click) 284618 259573 26 880 0 0% 0 0 20.451059
addressable-setters (click) 264101 221338 20 582 0 0% 0 0 13.528146
addressable-to-s (click) 283510 234227 26 849 0 0% 0 0 20.042575
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.778785
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.82714
erubi (click) 227893 182097 6 134 0 0% 0 0 3.924933
etanni (click) 30039 31433 8 114 0 0% 0 0 3.401209
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.83295
fluentd (click) 512957 433800 7 116 0 0% 0 0 3.545365
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.419013
graphql (click) 412837 394081 74 1940 18 0% 0 0 52.501131
graphql-native (click) 355968 326751 39 532 0 0% 0 0 13.731546
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.705875
lee (click) 317077 269823 50 1102 0 0% 0 0 30.282474
matmul (click) 11103 4709 8 136 0 0% 0 0 4.066537
nbody (click) 14448 21176 6 251 0 0% 0 0 6.10215
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.208718
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.251229
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.414412
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.174761
rack (click) 285203 286885 35 581 0 0% 0 0 14.42105
ruby-json (click) 20067 18091 8 210 0 0% 0 0 5.66657
rubyboy (click) 703257 637366 154 6875 42 0% 0 0 162.260893
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.330326
splay (click) 34617 22483 9 175 0 0% 0 0 5.273727
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.721257
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.876529
tinygql (click) 302454 257769 59 1026 5 0% 0 0 26.267721
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1853.721455
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.569488
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.091385
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.484955
fib (click) 2659 2995 3 30 0 0% 0 0 1.12735
getivar (click) 3789 6778 3 79 0 0% 0 0 1.911418
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.305833
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.820119
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.936886
object-new (click) 2406 2818 2 36 0 0% 0 0 1.006594
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.259521
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.76904
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.126576
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.796234
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.807264
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.250767
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.77466
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.078264
setivar (click) 2783 3726 3 46 0 0% 0 0 1.250966
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.398394
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.7242
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.453844
structaref (click) 4407 9095 3 88 0 0% 0 0 2.295946
structaset (click) 4113 5834 3 70 0 0% 0 0 1.768922
throw (click) 5953 4624 5 53 0 0% 0 0 1.762613

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.