Ruby Benchmarks

Details for Benchmarks at 2026-02-26 00:50:14 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.9% faster than CRuby 4.1.0dev
  • 6.4% faster than YJIT 3.4.7
On railsbench it is
  • 114.3% faster than CRuby 4.1.0dev
  • 13.4% 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 90 5 100 50 198 50 235
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 423 5 432 50 625 50 644
liquid-compile 5 406 5 482 50 553 50 728
liquid-render 5 172 5 177 50 432 50 441
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 196 50 253 50 265
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 248 50 254
ruby-lsp 5 157 5 163 50 239 50 231
sequel 5 424 5 440 50 605 50 613
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 172 50 183 50 202
addressable-join 5 73 5 80 50 64 50 75
addressable-merge 5 160 5 162 50 222 50 228
addressable-new 5 353 5 359 50 517 50 543
addressable-normalize 5 53 5 56 50 59 50 63
addressable-parse 5 103 5 107 50 104 50 114
addressable-setters 5 183 5 188 50 231 50 240
addressable-to-s 5 164 5 172 50 182 50 200
binarytrees 5 82 5 87 50 136 50 146
blurhash 5 83 5 86 50 143 50 145
erubi 5 140 5 147 50 138 50 148
etanni 5 99 5 72 50 72 50 39
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 62 5 64 50 20 50 31
graphql 5 375 5 466 50 570 50 971
graphql-native 5 59 5 78 50 23 50 68
knucleotide 5 162 5 160 50 118 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 246 5 292 50 677 50 704
nqueens 5 116 5 124 50 556 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 187 50 706 50 758
protoboeuf-encode 5 197 5 206 50 832 50 834
rack 5 440 5 458 50 716 50 728
ruby-json 5 81 5 100 50 47 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
sudoku 5 48 5 49 50 157 50 167
tinygql 5 40 5 44 50 39 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 451 50 455
attr_accessor 5 157 5 184 50 1834 50 1893
cfunc_itself 5 349 5 349 50 1255 50 1259
fib 5 124 5 142 50 939 50 940
getivar 5 216 5 318 50 2315 50 2426
getivar-module 5 104 5 136 50 90 50 268
keyword_args 5 100 5 101 50 1240 50 1243
loops-times 5 23 5 27 50 64 50 61
object-new 5 268 5 415 50 294 50 922
respond_to 5 139 5 132 50 3895 50 3898
ruby-xor 5 236 5 254 50 1313 50 1299
send_bmethod 5 116 5 126 50 5539 50 4528
send_cfunc_block 5 106 5 106 50 353 50 385
send_rubyfunc_block 5 251 5 257 50 6922 50 6932
setivar 5 359 5 479 50 4926 50 5045
setivar_object 5 341 5 299 50 751 50 541
setivar_young 5 341 5 302 50 798 50 554
str_concat 5 391 5 469 50 1200 50 1171
structaref 5 156 5 188 50 1811 50 1878
structaset 5 202 5 277 50 397 50 505
throw 5 1085 5 1335 50 1408 50 1856

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) 1547297 1288609 203 2652 0 0% 0 0 75.091682
chunky-png (click) 321430 287858 79 1376 1 0% 0 0 39.18536
erubi-rails (click) 1371624 1150514 268 3638 22 0% 0 0 98.084633
hexapdf (click) 1527709 1258130 594 15733 44 0% 0 0 437.849981
liquid-c (click) 558858 488900 114 2236 5 0% 0 0 59.667578
liquid-compile (click) 481873 424964 146 2729 2 0% 0 0 78.417511
liquid-render (click) 665687 563271 131 2959 8 0% 0 0 79.598291
lobsters (click) 8705460 7500172 3123 64315 120 0% 0 0 2207.018817
mail (click) 871785 847149 345 7728 40 0% 0 0 212.965058
psych-load (click) 288632 265521 61 831 2 0% 0 0 24.231938
railsbench (click) 3366338 2843261 1592 19851 97 0% 0 0 557.171386
rubocop (click) 5790459 4982633 3002 57209 125 0% 6 0 1670.939142
ruby-lsp (click) 1039309 926631 408 7437 46 0% 1 0 205.727051
sequel (click) 503303 446759 11 119 0 0% 0 0 3.804575
shipit (click) 7470359 6371509 3440 55729 174 0% 1 0 1818.890686
addressable-equality (click) 317291 260422 44 1380 1 0% 0 0 34.410259
addressable-getters (click) 277720 203503 26 863 0 0% 0 0 20.817704
addressable-join (click) 283093 252956 24 941 0 0% 0 0 23.734495
addressable-merge (click) 283124 247322 27 896 0 0% 0 0 22.329016
addressable-new (click) 259423 230257 21 591 0 0% 0 0 14.805345
addressable-normalize (click) 312698 255459 43 1327 1 0% 0 0 32.974739
addressable-parse (click) 282264 230417 26 880 0 0% 0 0 21.575928
addressable-setters (click) 258151 197959 20 582 0 0% 0 0 14.552733
addressable-to-s (click) 277231 202338 26 849 0 0% 0 0 20.557841
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.803436
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.160457
erubi (click) 248343 238993 6 134 0 0% 0 0 3.894568
etanni (click) 33355 27108 8 114 0 0% 0 0 3.447641
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.156198
fluentd (click) 487528 443995 7 116 0 0% 0 0 3.73085
graphql (click) 411839 343673 73 1909 19 0% 0 0 53.148775
graphql-native (click) 354779 300404 39 532 0 0% 0 0 13.971457
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.969204
lee (click) 319458 254941 49 1099 0 0% 0 0 31.248734
matmul (click) 11103 4709 8 136 0 0% 0 0 4.267138
nbody (click) 14448 21176 6 251 0 0% 0 0 6.087089
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.342079
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.470572
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.572967
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.033761
rack (click) 283854 284460 35 581 0 0% 0 0 14.916097
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.746452
rubyboy (click) 705200 622838 154 6873 42 0% 0 0 167.360217
rubykon (click) 150715 174889 138 2130 4 0% 0 0 58.296123
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.065143
tinygql (click) 300483 279308 59 1025 5 0% 0 0 27.01246
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1951.861342
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.59904
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.100372
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.510217
fib (click) 2659 2995 3 30 0 0% 0 0 1.100137
getivar (click) 3789 6778 3 79 0 0% 0 0 1.925191
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.306542
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.811223
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.972299
object-new (click) 2406 2818 2 36 0 0% 0 0 1.086654
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.133648
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.837058
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.817722
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.785042
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.501079
setivar (click) 2783 3726 3 46 0 0% 0 0 1.259924
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.421313
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.702912
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.431036
structaref (click) 4407 9095 3 88 0 0% 0 0 2.330368
structaset (click) 4113 5834 3 70 0 0% 0 0 1.773979
throw (click) 5953 4624 5 53 0 0% 0 0 1.79275

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.