Ruby Benchmarks

Details for Benchmarks at 2026-01-11 00:47:53 UTC

YJIT metrics from the ruby-bench suite using Ruby 0d4538b57d.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.6% faster than CRuby 4.1.0dev
  • 5.1% faster than YJIT 3.4.7
On railsbench it is
  • 116.3% faster than CRuby 4.1.0dev
  • 9.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 19 minutes
aarch64 runtime: 7 hours, 12 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 98 50 196 50 227
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 434 50 628 50 637
liquid-compile 5 418 5 475 50 583 50 717
liquid-render 5 171 5 173 50 432 50 435
mail 5 194 5 191 50 253 50 263
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 157 50 247 50 254
ruby-lsp 5 155 5 161 50 216 50 227
sequel 5 424 5 422 50 586 50 592
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 11
addressable-getters 5 165 5 166 50 182 50 196
addressable-join 5 72 5 76 50 66 50 71
addressable-merge 5 160 5 157 50 222 50 219
addressable-new 5 354 5 352 50 523 50 526
addressable-normalize 5 54 5 53 50 59 50 58
addressable-parse 5 103 5 103 50 103 50 107
addressable-setters 5 184 5 182 50 230 50 231
addressable-to-s 5 164 5 168 50 184 50 195
binarytrees 5 82 5 82 50 136 50 128
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 147 50 137 50 150
etanni 5 97 5 70 50 71 50 36
fannkuchredux 5 54 5 55 50 101 50 101
fluentd 5 56 5 60 50 20 50 32
graphql 5 370 5 470 50 569 50 912
graphql-native 5 59 5 86 50 23 50 64
knucleotide 5 163 5 154 50 118 50 109
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 95 50 96
nbody 5 247 5 276 50 677 50 706
nqueens 5 116 5 125 50 557 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 186 50 706 50 754
protoboeuf-encode 5 197 5 203 50 840 50 813
rack 5 440 5 454 50 718 50 690
ruby-json 5 84 5 98 50 46 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 157 50 165
tinygql 5 41 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 453 50 454
attr_accessor 5 158 5 200 50 1835 50 1933
cfunc_itself 5 345 5 354 50 1254 50 1259
fib 5 124 5 144 50 939 50 940
getivar 5 214 5 315 50 2317 50 2417
getivar-module 5 104 5 139 50 90 50 264
keyword_args 5 100 5 106 50 1239 50 1242
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 366 50 299 50 690
respond_to 5 139 5 137 50 3890 50 3906
ruby-xor 5 238 5 243 50 1314 50 1290
send_bmethod 5 117 5 124 50 5539 50 4527
send_cfunc_block 5 106 5 107 50 353 50 330
send_rubyfunc_block 5 251 5 247 50 6923 50 6923
setivar 5 360 5 474 50 4925 50 5037
setivar_object 5 341 5 302 50 754 50 638
setivar_young 5 341 5 305 50 797 50 660
str_concat 5 390 5 451 50 1200 50 1193
structaref 5 157 5 200 50 1807 50 1891
structaset 5 201 5 264 50 394 50 893
throw 5 1087 5 1266 50 1407 50 1594

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) 1538485 1333441 203 2634 0 0% 0 0 74.693909
chunky-png (click) 320216 311111 79 1373 1 0% 0 0 39.070083
erubi-rails (click) 1370182 1163550 268 3696 22 0% 0 0 99.269232
hexapdf (click) 1520777 1310852 593 15664 44 0% 0 0 439.159339
liquid-c (click) 556338 511644 114 2224 5 0% 0 0 59.462915
liquid-compile (click) 479168 390305 146 2702 2 0% 0 0 78.975773
liquid-render (click) 663019 603456 131 2946 8 0% 0 0 79.607093
mail (click) 866428 868769 345 7721 40 0% 0 0 215.940458
psych-load (click) 287547 289109 61 828 2 0% 0 0 23.971969
railsbench (click) 3354307 2851312 1591 19815 97 0% 0 0 557.823952
rubocop (click) 5768249 5007150 3002 56970 125 0% 6 0 1695.557275
ruby-lsp (click) 1036720 888190 408 7384 47 0% 1 0 206.963241
sequel (click) 502496 413991 11 119 0 0% 0 0 3.901424
shipit (click) 7499035 6273358 3282 51922 181 0% 0 0 1711.83267
addressable-equality (click) 317385 260858 44 1385 1 0% 0 0 34.482169
addressable-getters (click) 276579 226474 26 863 0 0% 0 0 21.008289
addressable-join (click) 282049 226914 24 941 0 0% 0 0 23.59806
addressable-merge (click) 284171 240414 27 896 0 0% 0 0 22.416684
addressable-new (click) 258379 196023 21 591 0 0% 0 0 14.967557
addressable-normalize (click) 314308 298361 43 1372 1 0% 0 0 33.671316
addressable-parse (click) 280046 237917 26 880 0 0% 0 0 21.807978
addressable-setters (click) 257760 214114 20 582 0 0% 0 0 14.714951
addressable-to-s (click) 275864 274323 26 849 0 0% 0 0 20.769375
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.815014
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.167907
erubi (click) 249551 233018 6 134 0 0% 0 0 3.91317
etanni (click) 32832 35642 8 113 0 0% 0 0 3.505068
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.165668
fluentd (click) 482743 423850 7 115 0 0% 0 0 3.690454
graphql (click) 410334 361471 73 1921 19 0% 0 0 54.17682
graphql-native (click) 354066 285655 39 532 0 0% 0 0 14.119324
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.022304
lee (click) 317069 286712 49 1097 0 0% 0 0 31.72041
matmul (click) 11103 4709 8 136 0 0% 0 0 4.269336
nbody (click) 14448 21176 6 251 0 0% 0 0 6.16273
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.458109
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.552643
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.00328
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.294471
rack (click) 282011 275303 35 626 0 0% 0 0 16.340019
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.756977
rubyboy (click) 704591 688118 154 6868 42 0% 0 0 167.495229
rubykon (click) 147221 147074 137 2084 3 0% 0 0 57.032523
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.255434
tinygql (click) 300779 271616 59 1031 5 0% 0 0 27.453703
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1936.238683
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.163613
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.106957
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.53832
fib (click) 2659 2995 3 30 0 0% 0 0 1.149186
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936096
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.338869
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.821501
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.941832
object-new (click) 2406 2818 2 36 0 0% 0 0 1.083891
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.187005
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.863826
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.827404
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.176296
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.500947
setivar (click) 2783 3726 3 46 0 0% 0 0 1.280956
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.40223
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.72928
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.449883
structaref (click) 4407 9095 3 88 0 0% 0 0 2.312024
structaset (click) 4113 5834 3 70 0 0% 0 0 1.811893
throw (click) 5953 4624 5 53 0 0% 0 0 1.866124

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.