Ruby Benchmarks

Details for Benchmarks at 2026-03-06 00:55:12 UTC

YJIT metrics from the ruby-bench suite using Ruby 45f030f9d7.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.5% faster than CRuby 4.1.0dev
  • 6.3% faster than YJIT 3.4.7
On railsbench it is
  • 112.5% faster than CRuby 4.1.0dev
  • 12.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 22 minutes
aarch64 runtime: 7 hours, 16 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 96 50 197 50 234
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 436 50 624 50 641
liquid-compile 5 420 5 487 50 582 50 732
liquid-render 5 167 5 177 50 435 50 454
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 200 50 250 50 279
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 161 50 246 50 254
ruby-lsp 5 156 5 162 50 240 50 233
sequel 5 427 5 446 50 599 50 617
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 176 50 183 50 204
addressable-join 5 73 5 82 50 66 50 79
addressable-merge 5 160 5 164 50 222 50 230
addressable-new 5 355 5 358 50 526 50 521
addressable-normalize 5 53 5 56 50 59 50 65
addressable-parse 5 103 5 109 50 104 50 116
addressable-setters 5 185 5 190 50 230 50 250
addressable-to-s 5 163 5 172 50 183 50 200
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 128 5 150 50 136 50 155
etanni 5 98 5 76 50 71 50 41
fannkuchredux 5 54 5 50 50 102 50 94
fluentd 5 63 5 62 50 20 50 36
graphql 5 371 5 473 50 570 50 945
graphql-native 5 58 5 89 50 21 50 69
knucleotide 5 163 5 155 50 117 50 108
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 94 50 98
nbody 5 246 5 260 50 676 50 703
nqueens 5 116 5 126 50 556 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 707 50 772
protoboeuf-encode 5 197 5 203 50 830 50 786
rack 5 439 5 457 50 700 50 731
ruby-json 5 82 5 102 50 47 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 170
tinygql 5 41 5 44 50 35 50 50
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 39 5 40 50 456 50 459
attr_accessor 5 157 5 201 50 1834 50 1927
cfunc_itself 5 348 5 326 50 1255 50 1259
fib 5 124 5 141 50 939 50 939
getivar 5 214 5 288 50 2314 50 2400
getivar-module 5 103 5 120 50 90 50 258
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 63
object-new 5 268 5 421 50 297 50 931
respond_to 5 139 5 136 50 3888 50 3909
ruby-xor 5 223 5 239 50 1313 50 1298
send_bmethod 5 117 5 119 50 5538 50 4526
send_cfunc_block 5 106 5 105 50 353 50 384
send_rubyfunc_block 5 250 5 250 50 6924 50 6918
setivar 5 359 5 442 50 4927 50 5014
setivar_object 5 341 5 305 50 751 50 646
setivar_young 5 341 5 308 50 800 50 668
str_concat 5 389 5 445 50 1201 50 1163
structaref 5 156 5 206 50 1811 50 1889
structaset 5 202 5 237 50 397 50 497
throw 5 1088 5 1381 50 1413 50 1756

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) 1551730 1341282 203 2662 0 0% 0 0 75.562711
chunky-png (click) 321430 287858 79 1376 1 0% 0 0 38.777512
erubi-rails (click) 1375236 1237449 268 3626 22 0% 0 0 96.605821
hexapdf (click) 1528766 1300204 594 15743 44 0% 0 0 436.238061
liquid-c (click) 559678 415476 114 2236 5 0% 0 0 58.722322
liquid-compile (click) 476844 426742 146 2714 2 0% 0 0 78.062433
liquid-render (click) 655055 606130 131 2959 8 0% 0 0 79.673945
lobsters (click) 8713813 7304204 3125 64351 120 0% 0 0 2104.624725
mail (click) 868458 851312 345 7728 40 0% 0 0 214.118993
psych-load (click) 288588 249108 61 831 2 0% 0 0 23.956772
railsbench (click) 3352086 2867476 1592 19756 97 0% 0 0 550.898219
rubocop (click) 5780462 5053601 3002 57099 125 0% 6 0 1664.029841
ruby-lsp (click) 1042124 945100 409 7472 47 0% 1 0 204.936076
sequel (click) 496215 424489 11 119 0 0% 0 0 3.818948
shipit (click) 7261170 6101395 3381 53731 168 0% 1 0 1808.286112
addressable-equality (click) 317247 276757 44 1380 1 0% 0 0 33.950932
addressable-getters (click) 274054 231926 26 863 0 0% 0 0 20.447106
addressable-join (click) 270785 230609 24 941 0 0% 0 0 23.316463
addressable-merge (click) 279453 251164 27 896 0 0% 0 0 21.838944
addressable-new (click) 246170 248123 21 591 0 0% 0 0 14.747236
addressable-normalize (click) 301849 284198 43 1362 1 0% 0 0 33.299541
addressable-parse (click) 280597 230165 26 882 0 0% 0 0 21.814294
addressable-setters (click) 258010 214175 20 582 0 0% 0 0 14.278941
addressable-to-s (click) 277327 243417 26 849 0 0% 0 0 20.509211
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.82899
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.328166
erubi (click) 247614 205008 6 134 0 0% 0 0 3.978494
etanni (click) 32951 34772 8 114 0 0% 0 0 3.458315
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.003579
fluentd (click) 488622 428583 7 116 0 0% 0 0 3.716143
graphql (click) 409996 365746 73 1909 19 0% 0 0 53.210944
graphql-native (click) 345770 331812 39 532 0 0% 0 0 13.917412
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.695422
lee (click) 317928 277961 49 1099 0 0% 0 0 31.109392
matmul (click) 11103 4709 8 136 0 0% 0 0 4.214708
nbody (click) 14448 21176 6 251 0 0% 0 0 6.163449
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.40242
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 107.755125
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.24901
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.0411
rack (click) 280537 272360 35 581 0 0% 0 0 15.03692
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.80386
rubyboy (click) 705200 622818 154 6873 42 0% 0 0 166.756265
rubykon (click) 149667 148880 138 2117 4 0% 0 0 56.64408
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.98556
tinygql (click) 300689 263140 59 1031 5 0% 0 0 27.052531
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1939.077311
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.992024
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.108949
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.475787
fib (click) 2659 2995 3 30 0 0% 0 0 1.108806
getivar (click) 3789 6778 3 79 0 0% 0 0 1.963481
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.374806
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.800182
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.953946
object-new (click) 2406 2818 2 36 0 0% 0 0 1.090223
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.161576
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.85422
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.801774
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.789308
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.446977
setivar (click) 2783 3726 3 46 0 0% 0 0 1.267703
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.434657
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.752326
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.40289
structaref (click) 4407 9095 3 88 0 0% 0 0 2.368942
structaset (click) 4113 5834 3 70 0 0% 0 0 1.820439
throw (click) 5953 4624 5 53 0 0% 0 0 1.822515

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.