Ruby Benchmarks

Details for Benchmarks at 2026-04-08 00:59:26 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.4% faster than CRuby 4.1.0dev
  • 7.7% faster than YJIT 3.4.7
On railsbench it is
  • 116.4% faster than CRuby 4.1.0dev
  • 14.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 minutes
aarch64 runtime: 7 hours, 51 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 92 5 97 50 199 50 242
chunky-png 5 32 5 31 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 427 50 618 50 639
liquid-compile 5 420 5 464 50 542 50 708
liquid-render 5 171 5 170 50 412 50 447
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 201 50 253 50 285
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 247 50 252
ruby-lsp 5 158 5 167 50 223 50 237
sequel 5 415 5 439 50 597 50 609
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 12 50 13
addressable-getters 5 165 5 166 50 183 50 194
addressable-join 5 75 5 78 50 65 50 73
addressable-merge 5 161 5 150 50 224 50 220
addressable-new 5 352 5 338 50 521 50 521
addressable-normalize 5 53 5 55 50 60 50 61
addressable-parse 5 104 5 102 50 103 50 109
addressable-setters 5 186 5 175 50 233 50 232
addressable-to-s 5 164 5 165 50 182 50 195
binarytrees 5 82 5 85 50 136 50 162
blurhash 5 84 5 84 50 145 50 145
erubi 5 132 5 147 50 136 50 146
etanni 5 100 5 79 50 72 50 46
fannkuchredux 5 52 5 57 50 100 50 105
fluentd 5 62 5 60 50 20 50 29
gcbench 5 10 5 10 50 10 50 16
graphql 5 373 5 447 50 571 50 955
graphql-native 5 57 5 86 50 22 50 69
knucleotide 5 162 5 140 50 118 50 94
lee 5 23 5 30 50 10 50 13
matmul 5 53 5 58 50 88 50 97
nbody 5 250 5 282 50 663 50 705
nqueens 5 119 5 121 50 554 50 576
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 697 50 782
protoboeuf-encode 5 196 5 193 50 800 50 819
rack 5 443 5 429 50 706 50 697
ruby-json 5 84 5 107 50 50 50 82
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 207 5 224 50 250 50 282
sudoku 5 48 5 49 50 155 50 159
tinygql 5 42 5 42 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 457 50 456
attr_accessor 5 157 5 176 50 1832 50 1881
cfunc_itself 5 347 5 320 50 1255 50 1259
fib 5 125 5 132 50 939 50 939
getivar 5 210 5 302 50 2313 50 2416
getivar-module 5 103 5 136 50 89 50 247
keyword_args 5 102 5 103 50 1240 50 1242
loops-times 5 23 5 24 50 63 50 61
object-new 5 268 5 472 50 297 50 1488
object-new-initialize 5 169 5 253 50 259 50 950
object-new-no-escape 5 81 5 131 50 89 50 507
respond_to 5 139 5 130 50 3901 50 3891
ruby-xor 5 247 5 235 50 1305 50 1295
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 106 5 107 50 305 50 287
send_rubyfunc_block 5 196 5 208 50 1372 50 1376
setivar 5 359 5 469 50 4930 50 5037
setivar_object 5 341 5 344 50 763 50 664
setivar_young 5 345 5 344 50 808 50 691
str_concat 5 391 5 452 50 1205 50 1169
structaref 5 153 5 166 50 1798 50 1861
structaset 5 198 5 228 50 369 50 475
throw 5 1108 5 1354 50 1442 50 1738

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) 1554384 1317545 203 2645 0 0% 0 0 74.043106
chunky-png (click) 325049 307214 79 1376 1 0% 0 0 38.663495
erubi-rails (click) 1378655 1262536 268 3626 23 0% 0 0 94.677079
hexapdf (click) 1529666 1382271 593 15710 44 0% 0 0 435.212827
liquid-c (click) 562128 474483 114 2232 5 0% 0 0 58.426127
liquid-compile (click) 486622 403080 146 2762 2 0% 0 0 80.851737
liquid-render (click) 669188 631018 131 2959 8 0% 0 0 77.861898
lobsters (click) 8615152 7242784 3128 64116 122 0% 0 0 2071.71132
mail (click) 875011 882662 345 7728 40 0% 0 0 210.583017
psych-load (click) 289965 224566 61 831 2 0% 0 0 23.680769
railsbench (click) 3362426 2894456 1592 19812 104 0% 0 0 538.816757
rubocop (click) 5787054 4863177 3002 57171 128 0% 6 0 1624.061242
ruby-lsp (click) 1035740 920154 409 7462 47 0% 1 0 199.948987
sequel (click) 507405 434189 11 119 0 0% 0 0 3.849313
shipit (click) 6961352 5847969 3131 50321 147 0% 0 0 1610.88638
addressable-equality (click) 321383 280396 44 1380 1 0% 0 0 33.381315
addressable-getters (click) 281721 223363 26 863 0 0% 0 0 21.582784
addressable-join (click) 292043 254267 24 1009 0 0% 0 0 25.45262
addressable-merge (click) 287446 242967 27 900 0 0% 0 0 22.172777
addressable-new (click) 261364 230943 21 583 0 0% 0 0 14.549282
addressable-normalize (click) 315014 256693 43 1327 1 0% 0 0 32.130404
addressable-parse (click) 285140 233713 26 912 0 0% 0 0 22.314565
addressable-setters (click) 261520 200123 20 588 0 0% 0 0 15.010066
addressable-to-s (click) 283289 232936 26 889 0 0% 0 0 21.358852
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.812811
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.821831
erubi (click) 251902 200355 6 134 0 0% 0 0 3.931886
etanni (click) 32981 26478 8 114 0 0% 0 0 3.437113
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.885866
fluentd (click) 492743 399551 7 116 0 0% 0 0 3.694685
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.45482
graphql (click) 413863 351966 73 1926 19 0% 0 0 53.106763
graphql-native (click) 355470 299323 39 532 0 0% 0 0 13.725581
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.794744
lee (click) 319035 302378 49 1099 0 0% 0 0 30.575978
matmul (click) 11103 4709 8 136 0 0% 0 0 4.11272
nbody (click) 14448 21176 6 251 0 0% 0 0 6.12535
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.330194
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.678534
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.777753
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.421213
rack (click) 290512 250932 35 633 0 0% 0 0 16.444989
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.716285
rubyboy (click) 708771 617514 154 6871 42 0% 0 0 166.004643
rubykon (click) 150465 141265 138 2123 4 0% 0 0 55.935021
splay (click) 34953 22682 9 175 0 0% 0 0 5.203428
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.923379
tinygql (click) 305256 275159 59 1037 5 0% 0 0 27.471199
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1884.828423
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.398017
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.071909
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.493292
fib (click) 2659 2995 3 30 0 0% 0 0 1.149675
getivar (click) 3789 6778 3 79 0 0% 0 0 1.949097
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.317153
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.780032
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.950879
object-new (click) 2406 2818 2 36 0 0% 0 0 0.988317
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.259187
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.975097
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.153173
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.786025
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.829439
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.323318
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.725098
setivar (click) 2783 3726 3 46 0 0% 0 0 1.266472
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.395264
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.720005
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.417982
structaref (click) 4407 9095 3 88 0 0% 0 0 2.355744
structaset (click) 4113 5834 3 70 0 0% 0 0 1.757874
throw (click) 5953 4624 5 53 0 0% 0 0 1.72008

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.