Ruby Benchmarks

Details for Benchmarks at 2025-10-10 01:02:57 UTC

YJIT metrics from the ruby-bench suite using Ruby 42bbe9a075.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.7% faster than CRuby 3.5.0dev
  • 1.6% slower than YJIT 3.4.7
On railsbench it is
  • 108.3% faster than CRuby 3.5.0dev
  • 2.9% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 44 minutes
aarch64 runtime: 5 hours, 50 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 83 5 85 50 195 50 216
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 421 5 389 50 626 50 509
liquid-compile 5 417 5 470 50 579 50 708
liquid-render 5 167 5 168 50 436 50 379
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 180 50 254 50 222
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 246
ruby-lsp 5 138 5 147 50 243 50 240
sequel 5 421 5 423 50 594 50 578
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 140 5 134 50 135 50 128
etanni 5 98 5 65 50 72 50 30
fannkuchredux 5 54 5 58 50 101 50 100
fluentd 5 57 5 55 50 20 50 28
graphql 5 372 5 455 50 573 50 912
graphql-native 5 58 5 82 50 22 50 59
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 56 50 95 50 91
nbody 5 246 5 293 50 703 50 698
nqueens 5 116 5 123 50 556 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 176 50 706 50 634
protoboeuf-encode 5 197 5 202 50 832 50 779
rack 5 429 5 436 50 716 50 680
ruby-json 5 82 5 80 50 47 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 156 50 155
tinygql 5 41 5 42 50 36 50 46
30k_ifelse 5 28 5 27 50 185 50 184
30k_methods 5 38 5 37 50 471 50 472
attr_accessor 5 158 5 199 50 1823 50 1911
cfunc_itself 5 347 5 341 50 1255 50 1258
fib 5 124 5 140 50 937 50 938
getivar 5 214 5 283 50 2313 50 2392
keyword_args 5 99 5 102 50 1239 50 1242
loops-times 5 23 5 23 50 62 50 57
object-new 5 268 5 350 50 297 50 566
respond_to 5 138 5 137 50 3884 50 3907
ruby-xor 5 236 5 242 50 1310 50 1272
setivar 5 360 5 351 50 4925 50 4919
setivar_object 5 339 5 329 50 746 50 543
setivar_young 5 341 5 329 50 797 50 566
str_concat 5 388 5 403 50 1201 50 1072
throw 5 1091 5 1137 50 1414 50 1546

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) 1550073 1306793 205 2579 0 0% 0 0 77.926251
chunky-png (click) 316659 307987 74 1322 1 0% 0 0 37.636747
erubi-rails (click) 1975632 1735329 262 3759 22 0% 0 0 102.607905
hexapdf (click) 1526823 1384225 594 15691 44 0% 0 0 441.107502
liquid-c (click) 553537 517605 114 2228 5 0% 0 0 59.38035
liquid-compile (click) 476863 412928 146 2725 2 0% 0 0 81.322727
liquid-render (click) 660080 575975 131 2946 8 0% 0 0 80.439087
lobsters (click) 8449803 7028657 3100 62359 118 0% 0 0 2183.699553
mail (click) 864125 801337 342 7696 40 0% 0 0 211.679647
psych-load (click) 288938 275081 61 830 2 0% 0 0 24.522305
railsbench (click) 3347229 3030323 1605 19537 47 0% 0 0 549.760983
rubocop (click) 5762118 4999697 3001 56848 125 0% 6 0 1687.889087
ruby-lsp (click) 964152 883909 347 6783 44 0% 1 0 183.451259
sequel (click) 502813 431259 11 119 0 0% 0 0 3.919654
shipit (click) 7577768 6376293 3264 52075 180 0% 0 0 1754.501907
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.666717
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.935792
erubi (click) 247359 222559 5 125 0 0% 0 0 3.798671
etanni (click) 32930 35718 8 114 0 0% 0 0 3.647222
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.927627
fluentd (click) 491651 434749 7 115 0 0% 0 0 3.694401
graphql (click) 410120 353171 73 1920 19 0% 0 0 53.783305
graphql-native (click) 356347 288872 39 532 0 0% 0 0 13.981319
lee (click) 319844 265691 49 1070 0 0% 0 0 31.360077
matmul (click) 11125 4603 8 132 0 0% 0 0 4.236743
nbody (click) 13890 20235 6 238 0 0% 0 0 5.883961
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.308549
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.357346
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.678695
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.755654
rack (click) 283303 259233 35 580 0 0% 0 0 15.184471
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.66532
rubyboy (click) 700697 626447 154 6864 42 0% 0 0 167.005166
rubykon (click) 146229 162118 137 2070 3 0% 0 0 57.139667
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.272038
tinygql (click) 299904 254120 59 1031 5 0% 0 0 27.045588
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1944.751098
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 475.791874
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.115805
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.539369
fib (click) 2659 2995 3 30 0 0% 0 0 1.120362
getivar (click) 3812 6802 3 78 0 0% 0 0 1.988362
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.805183
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.784502
object-new (click) 2406 2818 2 36 0 0% 0 0 1.092662
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.14485
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.710122
setivar (click) 2783 3726 3 46 0 0% 0 0 1.291475
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.42009
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.735957
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.445983
throw (click) 5953 4624 5 53 0 0% 0 0 1.831333

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.