Ruby Benchmarks

Details for Benchmarks at 2026-05-17 01:18:32 UTC

YJIT metrics from the ruby-bench suite using Ruby 71749b8826.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.5% faster than CRuby 4.1.0dev
  • 10.9% faster than YJIT 3.4.7
On railsbench it is
  • 120.2% faster than CRuby 4.1.0dev
  • 15.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 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 92 5 96 50 197 50 236
chunky-png 5 32 5 31 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 425 5 445 50 619 50 684
liquid-compile 5 420 5 522 50 583 50 860
liquid-render 5 171 5 174 50 431 50 470
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 209 50 254 50 310
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 247 50 254
ruby-lsp 5 159 5 158 50 223 50 234
sequel 5 422 5 458 50 584 50 665
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 217
addressable-join 5 74 5 86 50 64 50 85
addressable-merge 5 161 5 161 50 222 50 251
addressable-new 5 355 5 353 50 521 50 561
addressable-normalize 5 53 5 58 50 60 50 72
addressable-parse 5 104 5 108 50 104 50 124
addressable-setters 5 185 5 189 50 232 50 262
addressable-to-s 5 164 5 173 50 181 50 216
binarytrees 5 82 5 85 50 136 50 148
blurhash 5 84 5 80 50 144 50 145
erubi 5 135 5 149 50 138 50 156
etanni 5 100 5 78 50 73 50 46
fannkuchredux 5 55 5 57 50 101 50 107
fluentd 5 61 5 59 50 21 50 26
gcbench 5 10 5 10 50 10 50 17
graphql 5 367 5 467 50 565 50 979
graphql-native 5 58 5 88 50 23 50 69
knucleotide 5 163 5 143 50 117 50 97
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 55 50 88 50 95
nbody 5 250 5 276 50 662 50 702
nqueens 5 119 5 124 50 555 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 697 50 818
protoboeuf-encode 5 200 5 198 50 805 50 794
rack 5 440 5 470 50 708 50 816
ruby-json 5 84 5 114 50 50 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 221 50 246 50 284
sudoku 5 48 5 50 50 155 50 167
tinygql 5 41 5 42 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 455 50 455
attr_accessor 5 157 5 192 50 1830 50 1912
cfunc_itself 5 347 5 318 50 1255 50 1259
fib 5 124 5 135 50 939 50 939
getivar 5 216 5 325 50 2315 50 2431
getivar-module 5 101 5 137 50 89 50 266
keyword_args 5 102 5 105 50 1240 50 1242
loops-times 5 23 5 24 50 63 50 62
object-new 5 268 5 389 50 296 50 1516
object-new-initialize 5 169 5 232 50 259 50 1026
object-new-no-escape 5 80 5 138 50 89 50 519
respond_to 5 139 5 123 50 3893 50 3902
ruby-xor 5 247 5 231 50 1305 50 1298
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 104 5 106 50 306 50 274
send_rubyfunc_block 5 196 5 199 50 1372 50 1376
setivar 5 359 5 383 50 4929 50 4962
setivar_object 5 343 5 300 50 763 50 596
setivar_young 5 341 5 300 50 810 50 609
str_concat 5 391 5 461 50 1200 50 1146
structaref 5 153 5 190 50 1798 50 1881
structaset 5 198 5 225 50 369 50 477
throw 5 1110 5 1423 50 1439 50 1933

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) 1563035 1325591 203 2657 0 0% 0 0 73.765247
chunky-png (click) 325091 315680 79 1376 1 0% 0 0 38.557039
erubi-rails (click) 1384655 1162676 268 3626 23 0% 0 0 93.841991
hexapdf (click) 1535247 1297420 593 15779 44 0% 0 0 430.881083
liquid-c (click) 568029 486658 114 2240 5 0% 0 0 58.659126
liquid-compile (click) 487125 419243 146 2733 2 0% 0 0 78.398185
liquid-render (click) 672964 584600 131 2963 8 0% 0 0 78.44107
lobsters (click) 8596906 7349814 3125 63814 122 0% 0 0 2054.242036
mail (click) 875129 882115 345 7738 40 0% 0 0 209.819428
psych-load (click) 292842 244651 61 833 2 0% 0 0 24.0019
railsbench (click) 3358752 2899481 1592 19758 105 0% 0 0 541.600362
rubocop (click) 5804121 5095849 3002 57335 127 0% 6 0 1649.268579
ruby-lsp (click) 1052124 931504 409 7472 47 0% 1 0 200.560159
sequel (click) 510941 446151 11 119 0 0% 0 0 4.536222
shipit (click) 6891070 5943929 3134 50283 147 0% 0 0 1615.313326
addressable-equality (click) 323774 298833 44 1380 1 0% 0 0 33.334939
addressable-getters (click) 285832 252299 26 863 0 0% 0 0 20.487624
addressable-join (click) 291575 269318 24 945 0 0% 0 0 23.19846
addressable-merge (click) 290297 278078 27 896 0 0% 0 0 21.27489
addressable-new (click) 266598 245019 21 569 0 0% 0 0 13.846676
addressable-normalize (click) 320912 304374 43 1327 1 0% 0 0 31.764797
addressable-parse (click) 288554 245982 26 880 0 0% 0 0 21.431285
addressable-setters (click) 266514 247052 20 588 0 0% 0 0 14.338093
addressable-to-s (click) 285445 251253 26 849 0 0% 0 0 20.148838
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.892805
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.561152
erubi (click) 248410 220841 6 134 0 0% 0 0 3.823551
etanni (click) 32989 26478 8 114 0 0% 0 0 3.414949
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.981572
fluentd (click) 493861 400753 7 116 0 0% 0 0 3.789877
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.486893
graphql (click) 417441 389153 73 1931 19 0% 0 0 52.161019
graphql-native (click) 360713 330029 39 532 0 0% 0 0 13.875525
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.810826
lee (click) 321755 305925 49 1093 0 0% 0 0 30.802496
matmul (click) 11103 4709 8 136 0 0% 0 0 4.252671
nbody (click) 14448 21176 6 251 0 0% 0 0 6.13775
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.368723
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 108.457168
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.65496
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.558114
rack (click) 291727 252112 35 656 0 0% 0 0 16.429751
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.711884
rubyboy (click) 708696 633751 154 6873 42 0% 0 0 164.782494
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.725272
splay (click) 34953 22682 9 175 0 0% 0 0 5.3388
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.008345
tinygql (click) 286211 260670 59 1032 5 0% 0 0 26.688299
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1868.126959
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.779006
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.092867
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.528108
fib (click) 2659 2995 3 30 0 0% 0 0 1.106585
getivar (click) 3789 6778 3 79 0 0% 0 0 2.07373
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.407849
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.875448
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.997693
object-new (click) 2406 2818 2 36 0 0% 0 0 1.05436
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.303438
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.99054
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.186422
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.808105
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.823977
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.330708
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.817627
setivar (click) 2783 3726 3 46 0 0% 0 0 1.289949
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.466412
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.81159
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.543933
structaref (click) 4407 9095 3 88 0 0% 0 0 2.43428
structaset (click) 4113 5834 3 70 0 0% 0 0 1.804523
throw (click) 5953 4624 5 53 0 0% 0 0 1.783887

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.