Ruby Benchmarks

Details for Benchmarks at 2026-02-17 00:52:34 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.1% faster than CRuby 4.1.0dev
  • 6.2% faster than YJIT 3.4.7
On railsbench it is
  • 117.7% faster than CRuby 4.1.0dev
  • 12.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 17 minutes
aarch64 runtime: 7 hours, 11 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 99 50 191 50 230
chunky-png 5 31 5 33 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 420 5 430 50 624 50 640
liquid-compile 5 418 5 482 50 580 50 710
liquid-render 5 173 5 177 50 437 50 453
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 192 50 253 50 273
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 158 50 249 50 252
ruby-lsp 5 160 5 163 50 226 50 230
sequel 5 418 5 432 50 597 50 627
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 164 5 172 50 184 50 197
addressable-join 5 74 5 77 50 66 50 71
addressable-merge 5 159 5 157 50 222 50 220
addressable-new 5 354 5 356 50 521 50 527
addressable-normalize 5 53 5 53 50 59 50 60
addressable-parse 5 103 5 105 50 104 50 111
addressable-setters 5 186 5 184 50 230 50 231
addressable-to-s 5 163 5 171 50 183 50 196
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 86 50 143 50 145
erubi 5 135 5 149 50 124 50 152
etanni 5 98 5 74 50 72 50 41
fannkuchredux 5 55 5 57 50 102 50 106
fluentd 5 57 5 65 50 20 50 32
graphql 5 372 5 472 50 576 50 919
graphql-native 5 58 5 87 50 21 50 60
knucleotide 5 164 5 161 50 118 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 95 50 97
nbody 5 246 5 295 50 677 50 704
nqueens 5 116 5 129 50 556 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 188 50 706 50 770
protoboeuf-encode 5 197 5 203 50 828 50 823
rack 5 438 5 462 50 712 50 719
ruby-json 5 82 5 102 50 46 50 75
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 42 5 44 50 36 50 49
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 39 5 41 50 456 50 453
attr_accessor 5 157 5 203 50 1834 50 1929
cfunc_itself 5 349 5 368 50 1255 50 1259
fib 5 115 5 143 50 939 50 940
getivar 5 216 5 325 50 2313 50 2428
getivar-module 5 104 5 140 50 90 50 270
keyword_args 5 100 5 102 50 1240 50 1242
loops-times 5 23 5 27 50 64 50 61
object-new 5 268 5 415 50 298 50 920
respond_to 5 139 5 141 50 3892 50 3900
ruby-xor 5 236 5 257 50 1313 50 1287
send_bmethod 5 116 5 126 50 5538 50 4527
send_cfunc_block 5 107 5 106 50 352 50 379
send_rubyfunc_block 5 252 5 250 50 6926 50 6918
setivar 5 359 5 481 50 4927 50 5043
setivar_object 5 341 5 300 50 749 50 549
setivar_young 5 342 5 302 50 798 50 566
str_concat 5 391 5 460 50 1201 50 1191
structaref 5 156 5 193 50 1810 50 1882
structaset 5 201 5 251 50 397 50 497
throw 5 1090 5 1434 50 1419 50 1908

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) 1552773 1374478 203 2650 0 0% 0 0 74.931919
chunky-png (click) 323181 280460 79 1376 1 0% 0 0 39.524317
erubi-rails (click) 1377656 1126207 268 3626 22 0% 0 0 96.134393
hexapdf (click) 1526682 1256882 594 15720 44 0% 0 0 435.360862
liquid-c (click) 558820 497063 114 2236 5 0% 0 0 59.170925
liquid-compile (click) 482858 441984 146 2717 2 0% 0 0 78.44183
liquid-render (click) 665649 563271 131 2959 8 0% 0 0 79.339477
lobsters (click) 8707720 7382196 3126 64180 119 0% 0 0 2100.31199
mail (click) 871508 838761 345 7728 40 0% 0 0 212.503048
psych-load (click) 287017 279791 61 831 2 0% 0 0 23.738952
railsbench (click) 3348472 2928863 1592 19724 97 0% 0 0 548.085275
rubocop (click) 5789020 5014595 3002 57197 125 0% 6 0 1663.098755
ruby-lsp (click) 1042340 953669 409 7472 47 0% 1 0 204.314659
sequel (click) 504466 431697 11 119 0 0% 0 0 3.886723
addressable-equality (click) 318030 253112 44 1392 1 0% 0 0 34.692575
addressable-getters (click) 276537 242784 26 869 0 0% 0 0 21.095757
addressable-join (click) 287398 242037 24 1005 0 0% 0 0 25.243609
addressable-merge (click) 282983 247154 27 896 0 0% 0 0 22.123542
addressable-new (click) 257579 219907 21 563 0 0% 0 0 13.906022
addressable-normalize (click) 314253 257028 43 1346 1 0% 0 0 33.403032
addressable-parse (click) 280500 246410 26 882 0 0% 0 0 21.800819
addressable-setters (click) 257870 222307 20 582 0 0% 0 0 14.459554
addressable-to-s (click) 276951 234878 26 849 0 0% 0 0 20.378606
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.801269
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.106868
erubi (click) 248343 230801 6 134 0 0% 0 0 3.867055
etanni (click) 32900 34696 8 114 0 0% 0 0 3.444808
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.984844
fluentd (click) 487528 386635 7 116 0 0% 0 0 3.708805
graphql (click) 410306 366559 73 1909 19 0% 0 0 53.258036
graphql-native (click) 355854 293402 39 532 0 0% 0 0 14.232648
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.959969
lee (click) 317972 269798 49 1099 0 0% 0 0 31.205242
matmul (click) 11103 4709 8 136 0 0% 0 0 4.180369
nbody (click) 14448 21176 6 251 0 0% 0 0 6.147666
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.341159
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.118829
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.109872
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.969222
rack (click) 282618 258057 35 586 0 0% 0 0 15.247718
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.709854
rubyboy (click) 705009 622671 154 6871 42 0% 0 0 166.649317
rubykon (click) 149667 148880 138 2117 4 0% 0 0 56.490083
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.889469
tinygql (click) 301108 288112 59 1031 5 0% 0 0 27.352904
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1942.820618
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.064018
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.078863
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.518054
fib (click) 2659 2995 3 30 0 0% 0 0 1.116985
getivar (click) 3789 6778 3 79 0 0% 0 0 1.914687
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.28732
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818415
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.928679
object-new (click) 2406 2818 2 36 0 0% 0 0 1.068442
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.135068
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.817058
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.79984
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.789454
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.471389
setivar (click) 2783 3726 3 46 0 0% 0 0 1.256938
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.386338
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.69783
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.424307
structaref (click) 4407 9095 3 88 0 0% 0 0 2.326088
structaset (click) 4113 5834 3 70 0 0% 0 0 1.761116
throw (click) 5953 4624 5 53 0 0% 0 0 1.83704

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.