Ruby Benchmarks

Details for Benchmarks at 2025-10-17 01:02:54 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.8% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 105.9% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
x86_64 runtime: 6 hours, 41 minutes
aarch64 runtime: 5 hours, 46 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 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 84 5 85 50 193 50 217
chunky-png 5 31 5 32 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 396 50 622 50 553
liquid-compile 5 419 5 468 50 546 50 708
liquid-render 5 172 5 167 50 433 50 382
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 166 50 253 50 227
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 247 50 243
ruby-lsp 5 143 5 148 50 232 50 240
sequel 5 419 5 423 50 582 50 568
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 78 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 136 5 131 50 137 50 128
etanni 5 98 5 67 50 71 50 29
fannkuchredux 5 54 5 57 50 102 50 99
fluentd 5 56 5 55 50 29 50 25
graphql 5 373 5 440 50 569 50 909
graphql-native 5 57 5 84 50 20 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 95 50 91
nbody 5 247 5 265 50 704 50 693
nqueens 5 116 5 128 50 556 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 706 50 681
protoboeuf-encode 5 197 5 187 50 838 50 773
rack 5 437 5 432 50 711 50 677
ruby-json 5 82 5 80 50 47 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 50 50 157 50 158
tinygql 5 41 5 42 50 40 50 46
30k_ifelse 5 28 5 27 50 185 50 183
30k_methods 5 38 5 37 50 475 50 473
attr_accessor 5 157 5 198 50 1827 50 1910
cfunc_itself 5 347 5 354 50 1255 50 1258
fib 5 124 5 138 50 937 50 937
getivar 5 217 5 299 50 2314 50 2408
keyword_args 5 100 5 104 50 1240 50 1243
loops-times 5 23 5 23 50 62 50 57
object-new 5 268 5 353 50 297 50 585
respond_to 5 139 5 138 50 3885 50 3896
ruby-xor 5 236 5 247 50 1310 50 1272
setivar 5 360 5 351 50 4924 50 4925
setivar_object 5 339 5 325 50 747 50 545
setivar_young 5 341 5 325 50 801 50 568
str_concat 5 389 5 399 50 1202 50 1073
throw 5 1089 5 1103 50 1417 50 1549

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) 1545199 1318778 205 2579 0 0% 0 0 78.754232
chunky-png (click) 318097 268709 74 1322 1 0% 0 0 37.540531
erubi-rails (click) 1962075 1794580 259 3588 19 0% 0 0 97.885716
hexapdf (click) 1524775 1382721 593 15674 44 0% 0 0 439.987579
liquid-c (click) 555060 453417 114 2228 5 0% 0 0 60.909088
liquid-compile (click) 481391 417422 146 2750 2 0% 0 0 82.285134
liquid-render (click) 662013 545273 131 2946 8 0% 0 0 80.881666
lobsters (click) 8456126 7104954 3100 62432 118 0% 0 0 2113.086842
mail (click) 865447 827388 342 7696 40 0% 0 0 215.002372
psych-load (click) 288207 217079 61 830 2 0% 0 0 24.677679
railsbench (click) 3356488 2959662 1605 19569 47 0% 0 0 552.619155
rubocop (click) 5760853 4966187 3001 56859 125 0% 6 0 1786.013546
ruby-lsp (click) 954138 758911 347 6794 44 0% 1 0 183.553574
sequel (click) 501560 429871 11 119 0 0% 0 0 3.924873
shipit (click) 7576864 6323503 3261 51588 180 0% 0 0 1725.474726
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.604088
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.64298
erubi (click) 246996 222389 5 125 0 0% 0 0 3.859945
etanni (click) 32930 35718 8 114 0 0% 0 0 3.669512
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.812711
fluentd (click) 490692 458347 7 115 0 0% 0 0 3.752142
graphql (click) 409094 360159 73 1920 19 0% 0 0 54.844904
graphql-native (click) 354213 303241 39 532 0 0% 0 0 13.919917
lee (click) 317215 312581 49 1070 0 0% 0 0 31.143784
matmul (click) 11125 4603 8 132 0 0% 0 0 4.207483
nbody (click) 13890 20235 6 238 0 0% 0 0 5.869509
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.16458
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.587373
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.731829
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.714481
rack (click) 280070 264261 35 580 0 0% 0 0 14.969176
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.615718
rubyboy (click) 703219 637623 154 6864 42 0% 0 0 167.796843
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.211194
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.199834
tinygql (click) 299258 278210 59 1031 5 0% 0 0 27.387974
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1939.50081
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 483.354106
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.131653
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.532888
fib (click) 2659 2995 3 30 0 0% 0 0 1.112113
getivar (click) 3812 6802 3 78 0 0% 0 0 1.958198
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.833996
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.808544
object-new (click) 2406 2818 2 36 0 0% 0 0 1.037957
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.144295
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.696787
setivar (click) 2783 3726 3 46 0 0% 0 0 1.282139
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.464638
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.716751
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.548991
throw (click) 5953 4624 5 53 0 0% 0 0 1.829467

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.