Ruby Benchmarks

Details for Benchmarks at 2026-05-31 01:26:36 UTC

YJIT metrics from the ruby-bench suite using Ruby 5e7a7f9404.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.5% faster than CRuby 4.1.0dev
  • 11.3% faster than YJIT 3.4.7
On railsbench it is
  • 119.8% faster than CRuby 4.1.0dev
  • 16.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 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 90 5 95 50 199 50 246
chunky-png 5 32 5 32 50 34 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 448 50 622 50 686
liquid-compile 5 421 5 524 50 581 50 869
liquid-render 5 170 5 174 50 431 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 209 50 254 50 308
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 246 50 257
ruby-lsp 5 159 5 160 50 220 50 236
sequel 5 428 5 464 50 599 50 663
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 174 50 183 50 215
addressable-join 5 73 5 86 50 63 50 86
addressable-merge 5 161 5 160 50 223 50 249
addressable-new 5 353 5 349 50 513 50 555
addressable-normalize 5 52 5 58 50 60 50 73
addressable-parse 5 104 5 109 50 104 50 123
addressable-setters 5 185 5 190 50 233 50 261
addressable-to-s 5 164 5 174 50 181 50 213
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 84 5 83 50 145 50 145
erubi 5 141 5 150 50 126 50 150
etanni 5 100 5 78 50 73 50 45
fannkuchredux 5 55 5 57 50 100 50 109
fluentd 5 55 5 61 50 20 50 26
gcbench 5 10 5 10 50 10 50 18
graphql 5 369 5 474 50 533 50 1004
graphql-native 5 57 5 90 50 22 50 71
knucleotide 5 163 5 142 50 118 50 96
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 52 50 87 50 97
nbody 5 250 5 254 50 653 50 691
nqueens 5 119 5 121 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 177 50 697 50 824
protoboeuf-encode 5 196 5 197 50 796 50 797
rack 5 442 5 475 50 718 50 817
ruby-json 5 83 5 116 50 50 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 224 50 250 50 279
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 187 50 183
30k_methods 5 38 5 39 50 454 50 459
attr_accessor 5 157 5 177 50 1831 50 1879
cfunc_itself 5 348 5 315 50 1255 50 1258
fib 5 125 5 134 50 939 50 939
getivar 5 216 5 307 50 2306 50 2418
getivar-module 5 103 5 132 50 88 50 258
keyword_args 5 102 5 102 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 63
object-new 5 267 5 458 50 297 50 1523
object-new-initialize 5 169 5 233 50 259 50 1024
object-new-no-escape 5 80 5 138 50 89 50 513
respond_to 5 139 5 116 50 3903 50 3905
ruby-xor 5 247 5 233 50 1305 50 1294
send_bmethod 5 118 5 119 50 5539 50 4526
send_cfunc_block 5 107 5 106 50 307 50 268
send_rubyfunc_block 5 196 5 207 50 1372 50 1375
setivar 5 359 5 391 50 4929 50 4967
setivar_object 5 341 5 301 50 764 50 640
setivar_young 5 341 5 301 50 809 50 683
str_concat 5 390 5 448 50 1202 50 1140
structaref 5 153 5 173 50 1800 50 1857
structaset 5 198 5 224 50 369 50 488
throw 5 1107 5 1392 50 1443 50 1815

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) 1558412 1360849 203 2651 0 0% 0 0 77.159253
chunky-png (click) 322104 303576 79 1376 1 0% 0 0 37.990012
erubi-rails (click) 1383063 1119578 268 3626 23 0% 0 0 93.193927
hexapdf (click) 1530491 1300208 593 15767 44 0% 0 0 429.670845
liquid-c (click) 565655 484126 114 2240 5 0% 0 0 58.233926
liquid-compile (click) 478371 441558 146 2669 2 0% 0 0 73.101962
liquid-render (click) 673061 584658 131 2963 8 0% 0 0 77.355554
lobsters (click) 8543900 7227634 3125 63380 122 0% 0 0 2018.952681
mail (click) 876642 818902 345 7738 40 0% 0 0 208.135753
psych-load (click) 291445 226222 61 829 2 0% 0 0 23.359052
railsbench (click) 3356613 2864621 1592 19742 105 0% 0 0 534.787236
rubocop (click) 5803138 5094959 3002 57335 127 0% 6 0 1625.503199
ruby-lsp (click) 1052494 907178 409 7472 47 0% 1 0 199.240938
sequel (click) 507785 458633 11 119 0 0% 0 0 4.099827
shipit (click) 7146715 6207919 3120 49939 148 0% 0 0 1609.10302
addressable-equality (click) 324252 258208 44 1380 1 0% 0 0 33.184101
addressable-getters (click) 285832 235915 26 863 0 0% 0 0 20.420199
addressable-join (click) 287145 280489 24 941 0 0% 0 0 22.716901
addressable-merge (click) 287966 259185 27 896 0 0% 0 0 21.248693
addressable-new (click) 266068 228090 21 563 0 0% 0 0 13.596017
addressable-normalize (click) 317134 267018 43 1327 1 0% 0 0 31.653138
addressable-parse (click) 288549 254174 26 880 0 0% 0 0 21.127801
addressable-setters (click) 262699 225890 20 582 0 0% 0 0 13.837533
addressable-to-s (click) 281672 246670 26 849 0 0% 0 0 19.797181
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.739557
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.768065
erubi (click) 250985 223481 6 134 0 0% 0 0 3.804933
etanni (click) 32989 26478 8 114 0 0% 0 0 3.392971
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.840235
fluentd (click) 515281 433777 7 116 0 0% 0 0 3.669064
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.340489
graphql (click) 416477 338257 73 1931 19 0% 0 0 52.320087
graphql-native (click) 359832 336626 39 532 0 0% 0 0 13.405817
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.654989
lee (click) 318191 285080 49 1093 0 0% 0 0 30.412794
matmul (click) 11103 4709 8 136 0 0% 0 0 4.06751
nbody (click) 14448 21176 6 251 0 0% 0 0 6.149461
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.26892
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.443191
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.163284
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.709576
rack (click) 283870 250389 35 581 0 0% 0 0 14.537851
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.695457
rubyboy (click) 705377 588552 154 6871 42 0% 0 0 163.301375
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.66455
splay (click) 34617 22483 9 175 0 0% 0 0 5.219048
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.790853
tinygql (click) 304646 274779 59 1026 5 0% 0 0 26.34951
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.213008
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.296091
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.106802
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.505271
fib (click) 2659 2995 3 30 0 0% 0 0 1.067805
getivar (click) 3789 6778 3 79 0 0% 0 0 1.892407
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.312023
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.795543
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.9283
object-new (click) 2406 2818 2 36 0 0% 0 0 0.996982
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.275663
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.753149
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.116357
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.771352
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.789984
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.264418
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.683772
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251618
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.400825
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.701086
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.427117
structaref (click) 4407 9095 3 88 0 0% 0 0 2.333662
structaset (click) 4113 5834 3 70 0 0% 0 0 1.773232
throw (click) 5953 4624 5 53 0 0% 0 0 1.770511

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.