Ruby Benchmarks

Details for Benchmarks at 2025-12-08 00:42:08 UTC

YJIT metrics from the ruby-bench suite using Ruby 4f900c35bc.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 90.5% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 107.1% faster than CRuby 4.0.0dev
  • 4.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 4 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 84 5 88 50 190 50 223
chunky-png 5 31 5 33 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 423 5 397 50 626 50 547
liquid-compile 5 417 5 468 50 545 50 698
liquid-render 5 170 5 166 50 436 50 337
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 179 50 253 50 210
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 246 50 248
ruby-lsp 5 142 5 147 50 232 50 249
sequel 5 420 5 439 50 605 50 601
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 166 50 184 50 187
addressable-join 5 74 5 54 50 66 50 21
addressable-merge 5 160 5 153 50 222 50 209
addressable-new 5 352 5 335 50 521 50 493
addressable-normalize 5 53 5 53 50 59 50 56
addressable-parse 5 103 5 102 50 104 50 103
addressable-setters 5 185 5 178 50 230 50 213
addressable-to-s 5 163 5 165 50 183 50 187
binarytrees 5 82 5 83 50 136 50 131
blurhash 5 83 5 87 50 143 50 144
erubi 5 128 5 137 50 123 50 137
etanni 5 98 5 69 50 71 50 35
fannkuchredux 5 54 5 56 50 102 50 96
fluentd 5 56 5 62 50 20 50 23
graphql 5 373 5 458 50 576 50 939
graphql-native 5 59 5 80 50 23 50 63
knucleotide 5 162 5 160 50 117 50 115
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 95 50 91
nbody 5 242 5 260 50 676 50 705
nqueens 5 116 5 125 50 557 50 555
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 186 50 706 50 770
protoboeuf-encode 5 195 5 207 50 835 50 787
rack 5 443 5 449 50 719 50 699
ruby-json 5 82 5 100 50 47 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 157 50 147
tinygql 5 41 5 44 50 40 50 48
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 454 50 456
attr_accessor 5 157 5 210 50 1835 50 1939
cfunc_itself 5 347 5 352 50 1255 50 1259
fib 5 124 5 139 50 939 50 939
getivar 5 216 5 347 50 2312 50 2444
getivar-module 5 104 5 145 50 90 50 272
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 56
object-new 5 268 5 350 50 298 50 579
respond_to 5 139 5 140 50 3889 50 3903
ruby-xor 5 236 5 255 50 1314 50 1292
send_bmethod 5 116 5 124 50 5539 50 5543
send_cfunc_block 5 105 5 103 50 353 50 338
send_rubyfunc_block 5 250 5 243 50 6924 50 6929
setivar 5 360 5 393 50 4924 50 4971
setivar_object 5 341 5 333 50 751 50 603
setivar_young 5 341 5 337 50 796 50 635
str_concat 5 388 5 451 50 1197 50 1141
structaref 5 140 5 203 50 1812 50 1894
structaset 5 202 5 226 50 394 50 352
throw 5 1088 5 1246 50 1419 50 1529

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) 1547999 1361472 205 2579 0 0% 0 0 73.662851
chunky-png (click) 317101 291604 79 1373 1 0% 0 0 39.262662
erubi-rails (click) 1377004 1254950 267 3677 22 0% 0 0 98.670376
hexapdf (click) 1524236 1363681 594 15683 44 0% 0 0 447.56156
liquid-c (click) 555286 502576 114 2230 5 0% 0 0 60.563595
liquid-compile (click) 476197 411562 146 2727 2 0% 0 0 81.051055
liquid-render (click) 650522 580912 131 2946 8 0% 0 0 81.081751
lobsters (click) 8523041 7213370 3103 62405 118 0% 0 0 2179.585632
mail (click) 863897 792366 342 7700 40 0% 0 0 214.055083
psych-load (click) 287012 223213 61 828 2 0% 0 0 23.833968
railsbench (click) 3355397 2948874 1605 19566 47 0% 0 0 548.671676
rubocop (click) 5758925 5004249 3002 56850 127 0% 6 0 1771.58023
ruby-lsp (click) 958211 862094 343 6723 45 0% 1 0 181.622111
sequel (click) 503291 423192 11 119 0 0% 0 0 4.105523
shipit (click) 7622212 6435324 3347 53565 181 0% 1 0 1795.687419
addressable-equality (click) 320515 256148 44 1425 1 0% 0 0 35.054873
addressable-getters (click) 277913 236370 26 863 0 0% 0 0 20.902393
addressable-join (click) 283316 253070 24 941 0 0% 0 0 23.423563
addressable-merge (click) 283347 231052 27 896 0 0% 0 0 21.918786
addressable-new (click) 262639 208648 21 633 0 0% 0 0 15.771754
addressable-normalize (click) 313496 289217 43 1334 1 0% 0 0 33.047222
addressable-parse (click) 277209 226480 26 880 0 0% 0 0 21.814465
addressable-setters (click) 257371 205411 20 584 0 0% 0 0 14.504928
addressable-to-s (click) 277516 243511 26 849 0 0% 0 0 20.651544
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.809295
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.061768
erubi (click) 244254 226940 6 134 0 0% 0 0 3.942081
etanni (click) 32930 35718 8 114 0 0% 0 0 3.576891
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.029609
fluentd (click) 487801 438811 7 115 0 0% 0 0 3.741223
graphql (click) 407496 358391 73 1921 19 0% 0 0 53.700093
graphql-native (click) 353589 301813 39 532 0 0% 0 0 13.910022
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.655007
lee (click) 316972 254171 49 1097 0 0% 0 0 31.516616
matmul (click) 11103 4709 8 136 0 0% 0 0 4.223698
nbody (click) 14448 21176 6 251 0 0% 0 0 6.153439
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.317018
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.311885
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 72.839837
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 44.452029
rack (click) 279865 247218 35 580 0 0% 0 0 16.05838
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.726598
rubyboy (click) 701879 685136 154 6864 42 0% 0 0 167.929577
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.941654
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.628708
tinygql (click) 299617 253615 59 1031 5 0% 0 0 26.975221
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1926.416421
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.510596
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.098367
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.513036
fib (click) 2659 2995 3 30 0 0% 0 0 1.117615
getivar (click) 3789 6778 3 79 0 0% 0 0 1.937208
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.32137
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.834345
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.923334
object-new (click) 2406 2818 2 36 0 0% 0 0 1.105173
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.166589
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.844772
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.760009
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.217504
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.468047
setivar (click) 2783 3726 3 46 0 0% 0 0 1.280953
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.42791
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.736446
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.452638
structaref (click) 4407 9095 3 88 0 0% 0 0 2.334989
structaset (click) 3926 5614 3 70 0 0% 0 0 1.709133
throw (click) 5953 4624 5 53 0 0% 0 0 1.780484

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.