Ruby Benchmarks

Details for Benchmarks at 2026-02-27 00:52:08 UTC

YJIT metrics from the ruby-bench suite using Ruby 9ed1517cb9.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.4% faster than CRuby 4.1.0dev
  • 7.7% faster than YJIT 3.4.7
On railsbench it is
  • 113.9% faster than CRuby 4.1.0dev
  • 12.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 17 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 93 5 100 50 190 50 244
chunky-png 5 31 5 32 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 421 5 431 50 628 50 649
liquid-compile 5 415 5 488 50 583 50 745
liquid-render 5 170 5 175 50 430 50 453
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 201 50 252 50 268
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 247 50 253
ruby-lsp 5 160 5 164 50 223 50 230
sequel 5 423 5 437 50 596 50 636
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 177 50 184 50 203
addressable-join 5 74 5 82 50 65 50 76
addressable-merge 5 159 5 164 50 223 50 234
addressable-new 5 352 5 361 50 520 50 542
addressable-normalize 5 54 5 56 50 59 50 65
addressable-parse 5 103 5 108 50 103 50 115
addressable-setters 5 183 5 188 50 230 50 242
addressable-to-s 5 163 5 175 50 183 50 201
binarytrees 5 82 5 86 50 136 50 148
blurhash 5 83 5 86 50 143 50 145
erubi 5 129 5 150 50 123 50 144
etanni 5 99 5 73 50 71 50 39
fannkuchredux 5 55 5 57 50 102 50 105
fluentd 5 56 5 61 50 20 50 32
graphql 5 362 5 463 50 571 50 939
graphql-native 5 59 5 87 50 23 50 67
knucleotide 5 163 5 157 50 118 50 112
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 94 50 97
nbody 5 246 5 269 50 677 50 698
nqueens 5 116 5 129 50 555 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 757
protoboeuf-encode 5 197 5 201 50 835 50 803
rack 5 443 5 472 50 721 50 734
ruby-json 5 82 5 103 50 46 50 76
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 167
tinygql 5 41 5 44 50 35 50 49
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 451 50 455
attr_accessor 5 157 5 196 50 1833 50 1913
cfunc_itself 5 348 5 357 50 1255 50 1259
fib 5 124 5 145 50 938 50 940
getivar 5 215 5 335 50 2315 50 2435
getivar-module 5 104 5 141 50 90 50 269
keyword_args 5 100 5 99 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 413 50 300 50 917
respond_to 5 139 5 138 50 3888 50 3901
ruby-xor 5 236 5 254 50 1314 50 1298
send_bmethod 5 116 5 124 50 5539 50 4528
send_cfunc_block 5 106 5 107 50 353 50 384
send_rubyfunc_block 5 250 5 251 50 6921 50 6928
setivar 5 359 5 480 50 4923 50 5043
setivar_object 5 341 5 306 50 749 50 629
setivar_young 5 341 5 308 50 799 50 652
str_concat 5 391 5 438 50 1198 50 1170
structaref 5 156 5 188 50 1810 50 1865
structaset 5 200 5 250 50 396 50 497
throw 5 1088 5 1406 50 1405 50 1849

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) 1554199 1335007 203 2667 0 0% 0 0 75.619122
chunky-png (click) 320545 302698 79 1376 1 0% 0 0 39.061154
erubi-rails (click) 1378328 1142984 268 3678 22 0% 0 0 99.755114
hexapdf (click) 1530401 1349093 593 15786 44 0% 0 0 439.959744
liquid-c (click) 557771 454393 114 2236 5 0% 0 0 59.197826
liquid-compile (click) 482635 458380 146 2741 2 0% 0 0 79.208527
liquid-render (click) 664544 610622 131 2959 8 0% 0 0 79.816407
lobsters (click) 8674838 7386693 3124 63896 122 0% 0 0 2116.274344
mail (click) 870900 870201 345 7728 40 0% 0 0 215.585061
psych-load (click) 287939 272447 61 831 2 0% 0 0 23.914045
railsbench (click) 3364050 2930821 1592 19879 97 0% 0 0 554.845618
rubocop (click) 5779858 5077470 3002 57097 125 0% 6 0 1666.656546
ruby-lsp (click) 1042159 936756 409 7472 47 0% 1 0 204.974181
sequel (click) 502578 437509 11 119 0 0% 0 0 3.858555
shipit (click) 7154801 6025982 3299 52395 168 0% 0 0 1719.70096
addressable-equality (click) 318802 278326 44 1399 1 0% 0 0 35.060757
addressable-getters (click) 277579 227911 26 863 0 0% 0 0 20.892581
addressable-join (click) 281933 234800 24 941 0 0% 0 0 23.382914
addressable-merge (click) 282061 245689 27 896 0 0% 0 0 21.9432
addressable-new (click) 257815 220086 21 563 0 0% 0 0 14.124605
addressable-normalize (click) 312858 272037 43 1326 1 0% 0 0 32.57983
addressable-parse (click) 279368 244700 26 880 0 0% 0 0 21.66657
addressable-setters (click) 258150 238919 20 582 0 0% 0 0 14.489307
addressable-to-s (click) 279197 204770 26 889 0 0% 0 0 21.576324
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.820226
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.12129
erubi (click) 248299 206196 6 134 0 0% 0 0 3.892251
etanni (click) 33355 27108 8 114 0 0% 0 0 3.477817
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.093597
fluentd (click) 488622 445036 7 116 0 0% 0 0 3.713335
graphql (click) 409522 381534 73 1909 19 0% 0 0 53.404358
graphql-native (click) 353990 315330 39 532 0 0% 0 0 14.204186
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.726561
lee (click) 318016 253443 49 1099 0 0% 0 0 31.290801
matmul (click) 11103 4709 8 136 0 0% 0 0 4.271607
nbody (click) 14448 21176 6 251 0 0% 0 0 6.224711
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.361839
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.051761
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.326223
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.31787
rack (click) 285714 279086 35 628 0 0% 0 0 16.537001
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.714819
rubyboy (click) 703790 653623 154 6873 42 0% 0 0 166.900616
rubykon (click) 148683 164130 138 2104 4 0% 0 0 56.678442
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.278316
tinygql (click) 301064 279891 59 1031 5 0% 0 0 27.817616
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1948.877283
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.372074
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.084217
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.520132
fib (click) 2659 2995 3 30 0 0% 0 0 1.156485
getivar (click) 3789 6778 3 79 0 0% 0 0 1.938666
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.303304
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.80055
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.891413
object-new (click) 2406 2818 2 36 0 0% 0 0 1.095192
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.161898
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.829979
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.780279
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.777229
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.478861
setivar (click) 2783 3726 3 46 0 0% 0 0 1.281859
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.43
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.744612
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.433131
structaref (click) 4407 9095 3 88 0 0% 0 0 2.359711
structaset (click) 4113 5834 3 70 0 0% 0 0 1.77053
throw (click) 5953 4624 5 53 0 0% 0 0 1.803177

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.