Ruby Benchmarks

Details for Benchmarks at 2026-06-04 01:33:14 UTC

YJIT metrics from the ruby-bench suite using Ruby 1d104ecf97.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.5% faster than CRuby 4.1.0dev
  • 11.1% faster than YJIT 3.4.7
On railsbench it is
  • 120.5% faster than CRuby 4.1.0dev
  • 15.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 52 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 198 50 244
chunky-png 5 32 5 31 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 444 50 620 50 682
liquid-compile 5 418 5 522 50 544 50 868
liquid-render 5 173 5 175 50 431 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 254 50 313
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 247 50 253
ruby-lsp 5 163 5 161 50 223 50 230
sequel 5 427 5 462 50 600 50 663
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 19
addressable-getters 5 164 5 175 50 184 50 216
addressable-join 5 73 5 84 50 63 50 86
addressable-merge 5 160 5 162 50 222 50 252
addressable-new 5 351 5 351 50 520 50 558
addressable-normalize 5 53 5 58 50 60 50 73
addressable-parse 5 104 5 108 50 103 50 124
addressable-setters 5 185 5 190 50 233 50 264
addressable-to-s 5 164 5 174 50 181 50 214
binarytrees 5 82 5 83 50 136 50 150
blurhash 5 83 5 83 50 145 50 142
erubi 5 130 5 146 50 129 50 145
etanni 5 100 5 79 50 71 50 45
fannkuchredux 5 55 5 57 50 100 50 109
fluentd 5 62 5 66 50 27 50 27
gcbench 5 10 5 10 50 10 50 18
graphql 5 373 5 463 50 533 50 989
graphql-native 5 58 5 91 50 20 50 74
knucleotide 5 163 5 141 50 117 50 97
lee 5 22 5 30 50 10 50 19
matmul 5 53 5 51 50 88 50 95
nbody 5 249 5 248 50 663 50 692
nqueens 5 119 5 124 50 553 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 179 50 696 50 793
protoboeuf-encode 5 201 5 195 50 803 50 826
rack 5 443 5 473 50 722 50 811
ruby-json 5 84 5 115 50 50 50 96
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 218 50 250 50 273
sudoku 5 48 5 50 50 155 50 168
tinygql 5 41 5 43 50 35 50 57
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 456 50 455
attr_accessor 5 157 5 194 50 1834 50 1913
cfunc_itself 5 347 5 319 50 1251 50 1258
fib 5 124 5 134 50 939 50 937
getivar 5 215 5 315 50 2312 50 2420
getivar-module 5 103 5 139 50 89 50 284
keyword_args 5 102 5 100 50 1240 50 1240
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 463 50 296 50 1524
object-new-initialize 5 168 5 236 50 259 50 1031
object-new-no-escape 5 81 5 138 50 89 50 520
respond_to 5 139 5 124 50 3901 50 3898
ruby-xor 5 247 5 229 50 1306 50 1307
send_bmethod 5 118 5 114 50 5540 50 4515
send_cfunc_block 5 107 5 104 50 303 50 281
send_rubyfunc_block 5 196 5 202 50 1372 50 1375
setivar 5 359 5 389 50 4930 50 4956
setivar_object 5 341 5 291 50 759 50 590
setivar_young 5 341 5 290 50 809 50 607
str_concat 5 390 5 447 50 1202 50 1109
structaref 5 153 5 200 50 1796 50 1893
structaset 5 198 5 205 50 370 50 485
throw 5 1104 5 1335 50 1443 50 1742

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) 1558546 1303539 203 2668 0 0% 0 0 73.429701
chunky-png (click) 325387 274948 79 1376 1 0% 0 0 38.60526
erubi-rails (click) 1385318 1245837 268 3626 23 0% 0 0 94.033139
hexapdf (click) 1524685 1292375 593 15767 44 0% 0 0 423.845315
liquid-c (click) 566553 493916 114 2240 5 0% 0 0 58.733523
liquid-compile (click) 478513 392586 146 2669 2 0% 0 0 73.682474
liquid-render (click) 672979 560024 131 2963 8 0% 0 0 77.762599
lobsters (click) 8569042 7357990 3125 63509 122 0% 0 0 2044.460681
mail (click) 873664 798626 345 7738 40 0% 0 0 207.691159
psych-load (click) 292419 268906 61 829 2 0% 0 0 23.253009
railsbench (click) 3354933 3034733 1592 19741 105 0% 0 0 533.813036
rubocop (click) 5803211 5012378 3002 57344 127 0% 6 0 1734.532074
ruby-lsp (click) 1051880 914531 409 7470 47 0% 1 0 200.578338
sequel (click) 509718 436291 11 119 0 0% 0 0 4.304383
shipit (click) 7099352 6010636 3122 50160 147 0% 0 0 1592.649737
addressable-equality (click) 321446 288049 44 1380 1 0% 0 0 33.214538
addressable-getters (click) 284894 258835 26 863 0 0% 0 0 20.227616
addressable-join (click) 290268 259136 24 941 0 0% 0 0 22.731492
addressable-merge (click) 291249 246966 27 896 0 0% 0 0 21.554101
addressable-new (click) 262019 223191 21 563 0 0% 0 0 13.316738
addressable-normalize (click) 319969 278142 43 1327 1 0% 0 0 31.690328
addressable-parse (click) 284788 225010 26 880 0 0% 0 0 20.880333
addressable-setters (click) 266275 230371 20 582 0 0% 0 0 14.006449
addressable-to-s (click) 285173 259197 26 849 0 0% 0 0 20.044588
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.76211
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.770394
erubi (click) 251285 199221 6 134 0 0% 0 0 3.74035
etanni (click) 32989 26478 8 114 0 0% 0 0 3.412822
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.856014
fluentd (click) 513051 471288 7 116 0 0% 0 0 3.596283
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.323057
graphql (click) 417737 372977 73 1931 19 0% 0 0 53.067814
graphql-native (click) 360137 336922 39 532 0 0% 0 0 13.674346
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.720617
lee (click) 321767 305925 49 1093 0 0% 0 0 30.278859
matmul (click) 11103 4709 8 136 0 0% 0 0 4.134408
nbody (click) 14448 21176 6 251 0 0% 0 0 6.082635
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.209914
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 107.045255
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.543561
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.034287
rack (click) 287943 238901 35 581 0 0% 0 0 14.448349
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.691761
rubyboy (click) 704459 661556 154 6871 42 0% 0 0 163.086395
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.882588
splay (click) 34617 22483 9 175 0 0% 0 0 5.202433
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.882405
tinygql (click) 303708 248547 59 1026 5 0% 0 0 26.196001
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.307968
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.832662
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.129916
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.51377
fib (click) 2659 2995 3 30 0 0% 0 0 1.073896
getivar (click) 3789 6778 3 79 0 0% 0 0 1.93565
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.342281
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.791877
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.859828
object-new (click) 2406 2818 2 36 0 0% 0 0 1.001481
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.26855
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.750655
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.134431
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.791874
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.806265
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.263633
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.736424
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251197
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.380776
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.773665
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.502188
structaref (click) 4407 9095 3 88 0 0% 0 0 2.34043
structaset (click) 4113 5834 3 70 0 0% 0 0 1.776757
throw (click) 5953 4624 5 53 0 0% 0 0 1.777447

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.