Ruby Benchmarks

Details for Benchmarks at 2026-02-13 00:55:40 UTC

YJIT metrics from the ruby-bench suite using Ruby a88475d6cb.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.4% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 114.0% faster than CRuby 4.1.0dev
  • 11.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 25 minutes
aarch64 runtime: 7 hours, 18 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 91 5 98 50 199 50 238
chunky-png 5 31 5 32 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 428 50 628 50 643
liquid-compile 5 418 5 480 50 580 50 705
liquid-render 5 170 5 179 50 435 50 447
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 253 50 272
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 252
ruby-lsp 5 158 5 162 50 226 50 234
sequel 5 418 5 444 50 593 50 628
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 164 5 170 50 184 50 201
addressable-join 5 74 5 76 50 66 50 73
addressable-merge 5 161 5 159 50 222 50 224
addressable-new 5 350 5 358 50 525 50 537
addressable-normalize 5 53 5 53 50 59 50 60
addressable-parse 5 104 5 105 50 104 50 110
addressable-setters 5 185 5 186 50 229 50 235
addressable-to-s 5 165 5 169 50 182 50 197
binarytrees 5 82 5 86 50 136 50 143
blurhash 5 83 5 86 50 143 50 145
erubi 5 138 5 148 50 129 50 146
etanni 5 99 5 73 50 71 50 38
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 64 50 20 50 27
graphql 5 371 5 465 50 571 50 955
graphql-native 5 59 5 87 50 20 50 62
knucleotide 5 163 5 155 50 118 50 110
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 246 5 297 50 674 50 701
nqueens 5 116 5 125 50 556 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 186 50 707 50 699
protoboeuf-encode 5 197 5 207 50 841 50 805
rack 5 441 5 457 50 712 50 725
ruby-json 5 81 5 101 50 50 50 74
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 48 50 157 50 165
tinygql 5 40 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 38 5 40 50 453 50 453
attr_accessor 5 157 5 184 50 1837 50 1897
cfunc_itself 5 348 5 346 50 1255 50 1259
fib 5 124 5 144 50 939 50 939
getivar 5 217 5 319 50 2314 50 2427
getivar-module 5 104 5 136 50 90 50 268
keyword_args 5 100 5 108 50 1240 50 1243
loops-times 5 23 5 27 50 64 50 61
object-new 5 268 5 385 50 296 50 773
respond_to 5 139 5 141 50 3890 50 3899
ruby-xor 5 236 5 244 50 1313 50 1284
send_bmethod 5 117 5 124 50 5539 50 4527
send_cfunc_block 5 105 5 107 50 353 50 379
send_rubyfunc_block 5 250 5 252 50 6924 50 6926
setivar 5 359 5 484 50 4923 50 5047
setivar_object 5 341 5 302 50 751 50 638
setivar_young 5 341 5 306 50 796 50 660
str_concat 5 390 5 450 50 1200 50 1197
structaref 5 156 5 190 50 1807 50 1878
structaset 5 202 5 272 50 398 50 499
throw 5 1087 5 1308 50 1418 50 1676

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) 1551027 1381342 203 2656 0 0% 0 0 75.106199
chunky-png (click) 321334 295931 79 1376 1 0% 0 0 38.962252
erubi-rails (click) 1374949 1155250 268 3644 22 0% 0 0 96.994251
hexapdf (click) 1526475 1256598 593 15714 44 0% 0 0 436.730435
liquid-c (click) 558820 480679 114 2232 5 0% 0 0 59.690689
liquid-compile (click) 481710 449262 146 2731 2 0% 0 0 78.695115
liquid-render (click) 664521 626999 131 2959 8 0% 0 0 79.069525
lobsters (click) 8715487 7368271 3125 64238 117 0% 0 0 2114.492146
mail (click) 871691 806102 345 7728 40 0% 0 0 212.896738
psych-load (click) 287798 272279 61 831 2 0% 0 0 23.747665
railsbench (click) 3359462 2916606 1592 19785 97 0% 0 0 551.236968
rubocop (click) 5789794 5022778 3002 57191 125 0% 6 0 1662.294817
ruby-lsp (click) 1043347 872902 408 7446 46 0% 1 0 203.767937
sequel (click) 503710 422608 11 119 0 0% 0 0 4.03575
shipit (click) 7436423 6362377 3285 52297 178 0% 0 0 1709.976452
addressable-equality (click) 316263 267749 44 1380 1 0% 0 0 33.774641
addressable-getters (click) 277578 219719 26 863 0 0% 0 0 20.872577
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.476257
addressable-merge (click) 282198 237557 27 896 0 0% 0 0 22.451393
addressable-new (click) 257792 228269 21 563 0 0% 0 0 13.880079
addressable-normalize (click) 312698 263651 43 1327 1 0% 0 0 32.810626
addressable-parse (click) 280295 237978 26 880 0 0% 0 0 21.587125
addressable-setters (click) 257220 196381 20 582 0 0% 0 0 14.355581
addressable-to-s (click) 277186 218673 26 849 0 0% 0 0 20.503036
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.823509
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.113193
erubi (click) 248343 238993 6 134 0 0% 0 0 3.877105
etanni (click) 33355 27108 8 114 0 0% 0 0 3.428428
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.059928
fluentd (click) 487050 476009 7 116 0 0% 0 0 3.696238
graphql (click) 410313 342032 73 1909 19 0% 0 0 53.330593
graphql-native (click) 354784 300404 39 532 0 0% 0 0 14.022326
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.922666
lee (click) 317451 284904 49 1102 0 0% 0 0 31.313623
matmul (click) 11103 4709 8 136 0 0% 0 0 4.225215
nbody (click) 14448 21176 6 251 0 0% 0 0 6.146264
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.349627
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.237781
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.904606
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.293317
rack (click) 286407 255736 35 628 0 0% 0 0 16.290059
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.717457
rubyboy (click) 705161 622789 154 6873 42 0% 0 0 167.015379
rubykon (click) 149667 148880 138 2117 4 0% 0 0 57.135347
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.001291
tinygql (click) 301012 263417 59 1031 5 0% 0 0 27.080317
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1939.351445
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 488.750949
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.106711
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.526202
fib (click) 2659 2995 3 30 0 0% 0 0 1.1074
getivar (click) 3789 6778 3 79 0 0% 0 0 1.920421
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.337028
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.844953
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.917299
object-new (click) 2406 2818 2 36 0 0% 0 0 1.174999
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.124975
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.815825
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.763079
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.767471
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.441569
setivar (click) 2783 3726 3 46 0 0% 0 0 1.272014
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.424043
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.757466
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.424157
structaref (click) 4407 9095 3 88 0 0% 0 0 2.333608
structaset (click) 4113 5834 3 70 0 0% 0 0 1.752608
throw (click) 5953 4624 5 53 0 0% 0 0 1.882516

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.