Ruby Benchmarks

Details for Benchmarks at 2026-03-11 00:49:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 3fa74bff03.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.3% faster than CRuby 4.1.0dev
  • 6.0% faster than YJIT 3.4.7
On railsbench it is
  • 113.5% faster than CRuby 4.1.0dev
  • 14.0% faster than YJIT 3.4.7
x86_64 runtime: 10 hours, 2 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 90 5 98 50 198 50 235
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 422 5 439 50 623 50 654
liquid-compile 5 406 5 472 50 583 50 728
liquid-render 5 172 5 179 50 431 50 445
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 194 50 253 50 270
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 160 50 245 50 253
ruby-lsp 5 156 5 164 50 237 50 237
sequel 5 421 5 433 50 586 50 614
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 171 50 184 50 198
addressable-join 5 73 5 78 50 65 50 75
addressable-merge 5 159 5 162 50 223 50 229
addressable-new 5 351 5 355 50 524 50 522
addressable-normalize 5 53 5 55 50 59 50 63
addressable-parse 5 103 5 107 50 104 50 112
addressable-setters 5 184 5 190 50 228 50 242
addressable-to-s 5 164 5 171 50 183 50 196
binarytrees 5 82 5 86 50 136 50 147
blurhash 5 83 5 87 50 143 50 145
erubi 5 136 5 155 50 135 50 147
etanni 5 97 5 75 50 71 50 41
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 66 50 21 50 35
gcbench 5 10 5 10 50 10 50 10
graphql 5 372 5 460 50 578 50 936
graphql-native 5 59 5 89 50 23 50 66
knucleotide 5 163 5 160 50 117 50 114
lee 5 23 5 31 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 246 5 274 50 676 50 704
nqueens 5 116 5 126 50 556 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 176 50 707 50 766
protoboeuf-encode 5 197 5 203 50 834 50 776
rack 5 445 5 459 50 714 50 724
ruby-json 5 81 5 101 50 51 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 234 50 244 50 289
sudoku 5 48 5 49 50 157 50 168
tinygql 5 41 5 42 50 36 50 49
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 447 50 457
attr_accessor 5 157 5 210 50 1834 50 1938
cfunc_itself 5 347 5 352 50 1255 50 1259
fib 5 124 5 142 50 939 50 939
getivar 5 216 5 295 50 2313 50 2406
getivar-module 5 103 5 125 50 90 50 261
keyword_args 5 100 5 104 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 60
object-new 5 268 5 412 50 295 50 907
object-new-initialize 5 169 5 247 50 258 50 752
object-new-no-escape 5 81 5 130 50 89 50 369
respond_to 5 139 5 140 50 3889 50 3908
ruby-xor 5 236 5 226 50 1313 50 1299
send_bmethod 5 117 5 119 50 5538 50 4527
send_cfunc_block 5 107 5 106 50 353 50 384
send_rubyfunc_block 5 251 5 249 50 6924 50 6916
setivar 5 359 5 421 50 4922 50 5018
setivar_object 5 341 5 293 50 749 50 537
setivar_young 5 342 5 296 50 799 50 561
str_concat 5 391 5 437 50 1201 50 1168
structaref 5 156 5 208 50 1815 50 1908
structaset 5 202 5 242 50 396 50 496
throw 5 1084 5 1381 50 1406 50 1793

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) 1552804 1317029 203 2645 0 0% 0 0 75.283593
chunky-png (click) 321604 263367 79 1376 1 0% 0 0 39.140259
erubi-rails (click) 1376684 1173943 268 3648 22 0% 0 0 97.875258
hexapdf (click) 1526210 1305887 593 15713 44 0% 0 0 438.522914
liquid-c (click) 561291 489191 114 2236 5 0% 0 0 59.327228
liquid-compile (click) 481415 398933 146 2699 2 0% 0 0 78.14082
liquid-render (click) 665679 578962 131 2959 8 0% 0 0 79.603079
lobsters (click) 8704043 7237714 3127 64208 120 0% 0 0 2107.532774
mail (click) 872060 773657 345 7728 40 0% 0 0 215.396062
psych-load (click) 288902 249312 61 831 2 0% 0 0 24.004624
railsbench (click) 3352793 2934814 1592 19710 97 0% 0 0 551.988774
rubocop (click) 5783946 5089339 3002 57126 126 0% 6 0 1670.03611
ruby-lsp (click) 1042306 953354 409 7472 47 0% 1 0 205.132455
sequel (click) 503583 430611 11 119 0 0% 0 0 3.875086
shipit (click) 7481829 6242589 3440 55823 174 0% 1 0 1853.43124
addressable-equality (click) 316727 275551 44 1380 1 0% 0 0 34.280291
addressable-getters (click) 277990 244687 26 863 0 0% 0 0 20.990401
addressable-join (click) 283370 236781 24 941 0 0% 0 0 23.791853
addressable-merge (click) 283459 206658 27 898 0 0% 0 0 22.383727
addressable-new (click) 257300 194280 21 563 0 0% 0 0 13.983216
addressable-normalize (click) 313225 239609 43 1329 1 0% 0 0 32.474149
addressable-parse (click) 280707 205622 26 880 0 0% 0 0 21.761817
addressable-setters (click) 245819 232819 20 582 0 0% 0 0 14.133784
addressable-to-s (click) 277500 218926 26 849 0 0% 0 0 20.549147
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.791878
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.204631
erubi (click) 248207 213681 6 134 0 0% 0 0 3.866108
etanni (click) 32951 34772 8 114 0 0% 0 0 3.46562
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.060328
fluentd (click) 487798 403311 7 116 0 0% 0 0 3.72145
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.510791
graphql (click) 409341 364348 73 1909 19 0% 0 0 53.337181
graphql-native (click) 354651 291425 39 532 0 0% 0 0 14.036241
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.816541
lee (click) 318247 278199 49 1099 0 0% 0 0 31.274637
matmul (click) 11103 4709 8 136 0 0% 0 0 4.182687
nbody (click) 14448 21176 6 251 0 0% 0 0 6.228787
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.369537
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.445008
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.979764
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 47.620271
rack (click) 287251 263829 35 625 0 0% 0 0 16.428369
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.776407
rubyboy (click) 704487 662371 154 6877 42 0% 0 0 168.706245
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.924343
splay (click) 34953 22682 9 175 0 0% 0 0 5.324288
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.188123
tinygql (click) 301282 271813 59 1031 5 0% 0 0 27.316957
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1950.782735
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.614454
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.108526
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.509644
fib (click) 2659 2995 3 30 0 0% 0 0 1.108371
getivar (click) 3789 6778 3 79 0 0% 0 0 1.947313
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.361964
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.854476
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.978526
object-new (click) 2406 2818 2 36 0 0% 0 0 1.092714
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.34612
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.013525
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.19043
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.839623
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.818451
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.891004
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.464166
setivar (click) 2783 3726 3 46 0 0% 0 0 1.282382
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.453083
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.763758
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.521684
structaref (click) 4407 9095 3 88 0 0% 0 0 2.393025
structaset (click) 4113 5834 3 70 0 0% 0 0 1.819481
throw (click) 5953 4624 5 53 0 0% 0 0 1.814309

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.