Ruby Benchmarks

Details for Benchmarks at 2025-10-08 01:03:47 UTC

YJIT metrics from the ruby-bench suite using Ruby 68e0321327.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.3% faster than CRuby 3.5.0dev
  • 6.2% faster than YJIT 3.3.6
On railsbench it is
  • 103.8% faster than CRuby 3.5.0dev
  • 4.7% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 44 minutes
aarch64 runtime: 5 hours, 51 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 84 5 85 50 178 50 213
chunky-png 5 31 5 31 50 14 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 410 5 407 50 573 50 533
liquid-compile 5 407 5 472 50 548 50 688
liquid-render 5 170 5 165 50 416 50 375
lobsters 5 20 5 20 50 10 50 10
mail 5 190 5 177 50 238 50 211
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 140 5 141 50 208 50 219
ruby-lsp 5 143 5 144 50 229 50 245
sequel 5 420 5 426 50 574 50 578
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 77 50 142 50 128
blurhash 5 82 5 86 50 127 50 145
erubi 5 117 5 139 50 86 50 138
etanni 5 90 5 66 50 53 50 33
fannkuchredux 5 52 5 57 50 98 50 103
fluentd 5 63 5 60 50 23 50 29
graphql 5 331 5 455 50 443 50 913
graphql-native 5 52 5 82 50 10 50 63
lee 5 22 5 21 50 10 50 10
matmul 5 50 5 51 50 87 50 90
nbody 5 247 5 256 50 578 50 702
nqueens 5 120 5 129 50 74 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 177 50 621 50 669
protoboeuf-encode 5 177 5 195 50 325 50 778
rack 5 423 5 442 50 644 50 692
ruby-json 5 84 5 80 50 50 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 51 50 163 50 157
tinygql 5 40 5 42 50 39 50 46
30k_ifelse 5 28 5 27 50 214 50 184
30k_methods 5 39 5 37 50 477 50 471
attr_accessor 5 159 5 194 50 1727 50 1906
cfunc_itself 5 338 5 347 50 1137 50 1258
fib 5 126 5 139 50 913 50 937
getivar 5 212 5 283 50 2260 50 2389
keyword_args 5 103 5 103 50 1033 50 1243
loops-times 5 24 5 23 50 48 50 57
object-new 5 319 5 347 50 405 50 588
respond_to 5 128 5 139 50 3253 50 3906
ruby-xor 5 243 5 244 50 797 50 1268
setivar 5 361 5 383 50 3068 50 4961
setivar_object 5 358 5 358 50 683 50 555
setivar_young 5 367 5 357 50 698 50 582
str_concat 5 390 5 427 50 975 50 1150
throw 5 1266 5 1113 50 1725 50 1527

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) 1538119 1324899 205 2579 0 0% 0 0 72.826908
chunky-png (click) 317830 317242 74 1322 1 0% 0 0 37.424004
erubi-rails (click) 1931478 1651909 261 3691 22 0% 0 0 100.859016
hexapdf (click) 1517650 1344292 593 15738 43 0% 0 0 441.867107
liquid-c (click) 541522 437550 114 2228 5 0% 0 0 59.894322
liquid-compile (click) 461583 419085 146 2678 2 0% 0 0 79.094521
liquid-render (click) 649462 603815 131 2946 8 0% 0 0 79.667752
lobsters (click) 8437625 7080830 3101 62520 118 0% 0 0 2114.035971
mail (click) 858129 760135 342 7702 40 0% 0 0 212.563899
psych-load (click) 282761 259050 61 830 2 0% 0 0 24.444602
railsbench (click) 3324590 2879887 1605 19563 47 0% 0 0 550.974395
rubocop (click) 6109891 5313772 3012 63540 133 0% 6 0 1849.980101
ruby-lsp (click) 957558 859196 347 6783 44 0% 1 0 183.138477
sequel (click) 495550 422143 11 119 0 0% 0 0 3.827627
shipit (click) 7577486 6515296 3262 51887 180 0% 0 0 1764.55421
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.613715
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.905064
erubi (click) 248171 231460 5 125 0 0% 0 0 3.810739
etanni (click) 32930 35718 8 114 0 0% 0 0 3.60327
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.836823
fluentd (click) 467226 396436 7 115 0 0% 0 0 3.73772
graphql (click) 391008 355519 73 1920 18 0% 0 0 54.06546
graphql-native (click) 347412 253361 39 532 0 0% 0 0 13.911023
lee (click) 310629 287322 49 1070 0 0% 0 0 31.347559
matmul (click) 11125 4603 8 132 0 0% 0 0 4.219088
nbody (click) 13890 20235 6 238 0 0% 0 0 5.893487
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.274337
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.864954
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.780666
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.60694
rack (click) 274974 241032 35 580 0 0% 0 0 14.988065
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.65091
rubyboy (click) 690137 630244 154 6864 42 0% 0 0 168.255075
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.549265
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.152911
tinygql (click) 301401 280431 59 1031 5 0% 0 0 27.634711
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1930.868256
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.67475
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.138075
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.506058
fib (click) 2659 2995 3 30 0 0% 0 0 1.15196
getivar (click) 3812 6802 3 78 0 0% 0 0 1.948897
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.848005
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.812181
object-new (click) 2406 2818 2 36 0 0% 0 0 1.060325
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.137901
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.708704
setivar (click) 2783 3726 3 46 0 0% 0 0 1.285254
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.419913
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.758565
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.523427
throw (click) 5953 4624 5 53 0 0% 0 0 1.839121

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.