Ruby Benchmarks

Details for Benchmarks at 2026-01-03 00:40:56 UTC

YJIT metrics from the ruby-bench suite using Ruby 2f4119eaea.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.0% faster than CRuby 4.1.0dev
  • 4.6% faster than YJIT 3.4.7
On railsbench it is
  • 113.8% faster than CRuby 4.1.0dev
  • 9.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 6 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 98 50 190 50 231
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 421 5 421 50 627 50 624
liquid-compile 5 420 5 460 50 583 50 696
liquid-render 5 170 5 175 50 434 50 426
mail 5 195 5 188 50 253 50 250
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 158 50 247 50 249
ruby-lsp 5 141 5 148 50 222 50 248
sequel 5 421 5 422 50 586 50 589
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 163 5 166 50 183 50 187
addressable-join 5 73 5 76 50 65 50 68
addressable-merge 5 160 5 154 50 221 50 217
addressable-new 5 346 5 341 50 523 50 503
addressable-normalize 5 53 5 52 50 59 50 56
addressable-parse 5 103 5 103 50 104 50 107
addressable-setters 5 182 5 178 50 230 50 223
addressable-to-s 5 163 5 167 50 183 50 188
binarytrees 5 82 5 82 50 136 50 128
blurhash 5 83 5 87 50 143 50 141
erubi 5 135 5 149 50 135 50 153
etanni 5 99 5 70 50 71 50 35
fannkuchredux 5 54 5 57 50 101 50 95
fluentd 5 56 5 64 50 20 50 25
graphql 5 361 5 462 50 571 50 909
graphql-native 5 58 5 85 50 23 50 64
knucleotide 5 164 5 156 50 118 50 109
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 53 50 94 50 97
nbody 5 247 5 277 50 676 50 702
nqueens 5 116 5 128 50 556 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 744
protoboeuf-encode 5 197 5 198 50 830 50 785
rack 5 436 5 453 50 704 50 692
ruby-json 5 84 5 97 50 46 50 69
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 157 50 164
tinygql 5 42 5 42 50 40 50 49
30k_ifelse 5 28 5 28 50 186 50 182
30k_methods 5 39 5 41 50 456 50 454
attr_accessor 5 157 5 218 50 1836 50 1950
cfunc_itself 5 347 5 350 50 1255 50 1259
fib 5 123 5 142 50 940 50 939
getivar 5 214 5 338 50 2316 50 2441
getivar-module 5 104 5 145 50 90 50 271
keyword_args 5 100 5 104 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 60
object-new 5 268 5 366 50 297 50 667
respond_to 5 139 5 142 50 3891 50 3893
ruby-xor 5 237 5 243 50 1315 50 1290
send_bmethod 5 116 5 122 50 5538 50 4528
send_cfunc_block 5 106 5 106 50 353 50 339
send_rubyfunc_block 5 251 5 248 50 6923 50 6919
setivar 5 360 5 473 50 4925 50 5039
setivar_object 5 341 5 298 50 751 50 537
setivar_young 5 341 5 300 50 795 50 554
str_concat 5 390 5 452 50 1200 50 1205
structaref 5 157 5 220 50 1810 50 1923
structaset 5 202 5 224 50 395 50 493
throw 5 1086 5 1267 50 1415 50 1555

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) 1544225 1338680 203 2649 0 0% 0 0 76.758564
chunky-png (click) 323246 288820 79 1373 1 0% 0 0 39.3489
erubi-rails (click) 1366277 1159985 268 3668 22 0% 0 0 97.819825
hexapdf (click) 1517654 1251332 593 15659 43 0% 0 0 437.213249
liquid-c (click) 557116 504895 114 2228 5 0% 0 0 60.102299
liquid-compile (click) 479660 390783 146 2708 2 0% 0 0 78.574065
liquid-render (click) 663282 554552 131 2946 8 0% 0 0 79.968035
mail (click) 863934 824894 345 7721 40 0% 0 0 215.480204
psych-load (click) 287917 273734 61 828 2 0% 0 0 24.113218
railsbench (click) 3338039 2938914 1591 19695 97 0% 0 0 553.117246
rubocop (click) 5774705 4971101 3002 57041 126 0% 6 0 1672.716343
ruby-lsp (click) 962841 841432 342 6701 44 0% 1 0 181.077755
sequel (click) 499848 403186 11 119 0 0% 0 0 3.978404
shipit (click) 7447723 6304157 3436 55593 174 0% 1 0 1832.453136
addressable-equality (click) 319326 254894 44 1416 1 0% 0 0 35.103762
addressable-getters (click) 279174 228788 26 863 0 0% 0 0 20.989886
addressable-join (click) 281878 235672 24 941 0 0% 0 0 23.521739
addressable-merge (click) 282450 238693 27 896 0 0% 0 0 22.038791
addressable-new (click) 259030 213644 21 591 0 0% 0 0 14.92133
addressable-normalize (click) 312670 264070 43 1334 1 0% 0 0 33.156902
addressable-parse (click) 280043 237917 26 880 0 0% 0 0 21.794305
addressable-setters (click) 259761 231642 20 584 0 0% 0 0 15.01289
addressable-to-s (click) 276934 243188 26 849 0 0% 0 0 20.992325
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.802067
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.10613
erubi (click) 247835 198529 6 134 0 0% 0 0 3.924744
etanni (click) 33287 36246 8 113 0 0% 0 0 3.543124
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.059326
fluentd (click) 482727 423851 7 115 0 0% 0 0 3.747414
graphql (click) 410135 361382 73 1921 19 0% 0 0 54.803965
graphql-native (click) 354016 319190 39 532 0 0% 0 0 14.213813
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.054947
lee (click) 316983 287422 49 1097 0 0% 0 0 31.715479
matmul (click) 11103 4709 8 136 0 0% 0 0 4.267798
nbody (click) 14448 21176 6 251 0 0% 0 0 6.139213
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.329116
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.561633
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.360911
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.353685
rack (click) 282811 235737 35 626 0 0% 0 0 16.362135
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.773351
rubyboy (click) 704402 696108 154 6864 42 0% 0 0 167.660776
rubykon (click) 146441 162602 137 2076 3 0% 0 0 55.879122
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.217655
tinygql (click) 300779 271616 59 1031 5 0% 0 0 27.487309
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1929.605046
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.619089
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.095403
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.521098
fib (click) 2659 2995 3 30 0 0% 0 0 1.132394
getivar (click) 3789 6778 3 79 0 0% 0 0 1.954263
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.28871
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.850928
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.931624
object-new (click) 2406 2818 2 36 0 0% 0 0 1.063926
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13891
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.840686
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.862801
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.159755
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.489257
setivar (click) 2783 3726 3 46 0 0% 0 0 1.291223
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.415904
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.735504
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.473249
structaref (click) 4407 9095 3 88 0 0% 0 0 2.359614
structaset (click) 3926 5614 3 70 0 0% 0 0 1.763811
throw (click) 5953 4624 5 53 0 0% 0 0 1.820938

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.