Ruby Benchmarks

Details for Benchmarks at 2026-01-05 00:47:22 UTC

YJIT metrics from the ruby-bench suite using Ruby 7d5c0247eb.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.9% faster than CRuby 4.1.0dev
  • 3.1% faster than YJIT 3.4.7
On railsbench it is
  • 112.8% faster than CRuby 4.1.0dev
  • 9.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 11 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 93 5 97 50 198 50 216
chunky-png 5 30 5 32 50 32 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 425 50 624 50 630
liquid-compile 5 408 5 470 50 583 50 718
liquid-render 5 171 5 174 50 433 50 435
mail 5 195 5 189 50 254 50 255
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 248 50 247
ruby-lsp 5 145 5 147 50 232 50 247
sequel 5 428 5 425 50 598 50 586
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 169 50 184 50 190
addressable-join 5 71 5 77 50 65 50 68
addressable-merge 5 160 5 154 50 222 50 214
addressable-new 5 354 5 348 50 525 50 497
addressable-normalize 5 53 5 52 50 59 50 56
addressable-parse 5 103 5 104 50 104 50 106
addressable-setters 5 184 5 179 50 231 50 222
addressable-to-s 5 163 5 168 50 182 50 188
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 88 50 140 50 144
erubi 5 133 5 149 50 119 50 151
etanni 5 99 5 70 50 71 50 36
fannkuchredux 5 54 5 57 50 102 50 103
fluentd 5 56 5 62 50 20 50 32
graphql 5 373 5 458 50 569 50 956
graphql-native 5 59 5 86 50 22 50 67
knucleotide 5 163 5 156 50 118 50 109
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 54 50 94 50 97
nbody 5 247 5 275 50 676 50 701
nqueens 5 116 5 129 50 556 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 707 50 766
protoboeuf-encode 5 197 5 204 50 832 50 789
rack 5 429 5 450 50 705 50 697
ruby-json 5 81 5 98 50 50 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 156 50 162
tinygql 5 41 5 44 50 35 50 49
30k_ifelse 5 28 5 29 50 185 50 182
30k_methods 5 38 5 41 50 453 50 455
attr_accessor 5 158 5 197 50 1835 50 1916
cfunc_itself 5 345 5 345 50 1255 50 1259
fib 5 124 5 142 50 940 50 939
getivar 5 217 5 330 50 2315 50 2439
getivar-module 5 104 5 141 50 90 50 269
keyword_args 5 100 5 103 50 1240 50 1242
loops-times 5 23 5 26 50 64 50 61
object-new 5 268 5 364 50 298 50 679
respond_to 5 139 5 141 50 3887 50 3902
ruby-xor 5 237 5 246 50 1315 50 1290
send_bmethod 5 116 5 124 50 5539 50 4527
send_cfunc_block 5 105 5 105 50 353 50 340
send_rubyfunc_block 5 250 5 247 50 6923 50 6925
setivar 5 360 5 471 50 4927 50 5039
setivar_object 5 341 5 302 50 754 50 619
setivar_young 5 341 5 305 50 796 50 655
str_concat 5 391 5 461 50 1202 50 1189
structaref 5 156 5 200 50 1812 50 1897
structaset 5 202 5 252 50 397 50 508
throw 5 1087 5 1274 50 1400 50 1579

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) 1543603 1337947 203 2640 0 0% 0 0 76.633151
chunky-png (click) 320530 312271 79 1373 1 0% 0 0 38.624086
erubi-rails (click) 1363680 1131464 269 3682 22 0% 0 0 98.858246
hexapdf (click) 1522267 1346009 593 15675 44 0% 0 0 437.876245
liquid-c (click) 556106 512145 114 2228 5 0% 0 0 59.040759
liquid-compile (click) 477888 388919 146 2691 2 0% 0 0 77.637257
liquid-render (click) 663689 604065 131 2946 8 0% 0 0 79.48326
mail (click) 866384 901942 345 7721 40 0% 0 0 213.817486
psych-load (click) 288196 257578 61 828 2 0% 0 0 23.865942
railsbench (click) 3340432 2884286 1591 19734 97 0% 0 0 555.934924
rubocop (click) 5757653 5035482 3002 56860 125 0% 6 0 1660.30183
ruby-lsp (click) 960089 872785 343 6729 45 0% 1 0 180.542318
sequel (click) 502631 423146 11 119 0 0% 0 0 3.928542
shipit (click) 7248241 6154976 3380 53683 169 0% 1 0 1756.608078
addressable-equality (click) 317156 293808 44 1390 1 0% 0 0 34.710892
addressable-getters (click) 276752 252042 26 863 0 0% 0 0 20.97325
addressable-join (click) 286852 241840 24 1005 0 0% 0 0 25.83414
addressable-merge (click) 281909 262826 27 896 0 0% 0 0 22.161443
addressable-new (click) 257721 236620 21 565 0 0% 0 0 14.219961
addressable-normalize (click) 312481 271936 43 1330 1 0% 0 0 32.866531
addressable-parse (click) 279695 237649 26 880 0 0% 0 0 21.631069
addressable-setters (click) 256935 238039 20 582 0 0% 0 0 14.399103
addressable-to-s (click) 278893 229231 26 889 0 0% 0 0 21.566117
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.791037
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.059811
erubi (click) 248119 215141 6 134 0 0% 0 0 3.998146
etanni (click) 32832 35642 8 113 0 0% 0 0 3.49867
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.017896
fluentd (click) 482727 432111 7 115 0 0% 0 0 3.735467
graphql (click) 409832 344761 73 1921 19 0% 0 0 54.182638
graphql-native (click) 354612 295167 39 532 0 0% 0 0 14.259842
knucleotide (click) 9997 11103 7 113 0 0% 0 0 8.545686
lee (click) 317211 279517 49 1094 0 0% 0 0 31.366132
matmul (click) 11103 4709 8 136 0 0% 0 0 4.211953
nbody (click) 14448 21176 6 251 0 0% 0 0 6.101359
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.308022
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.377063
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.912905
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.607004
rack (click) 285017 213762 35 654 0 0% 0 0 17.123697
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.708642
rubyboy (click) 705547 615577 154 6868 42 0% 0 0 168.305666
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.390533
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.168334
tinygql (click) 301186 255593 59 1031 5 0% 0 0 26.873605
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1925.926657
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.422107
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.046774
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.518689
fib (click) 2659 2995 3 30 0 0% 0 0 1.149177
getivar (click) 3789 6778 3 79 0 0% 0 0 1.901842
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.281944
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.813815
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.905728
object-new (click) 2406 2818 2 36 0 0% 0 0 1.086725
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.167685
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.886891
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.797074
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.168825
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.447751
setivar (click) 2783 3726 3 46 0 0% 0 0 1.276957
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.40886
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.714725
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.391249
structaref (click) 4407 9095 3 88 0 0% 0 0 2.364488
structaset (click) 3926 5614 3 70 0 0% 0 0 1.733981
throw (click) 5953 4624 5 53 0 0% 0 0 1.85425

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.