Ruby Benchmarks

Details for Benchmarks at 2025-09-13 03:43:25 UTC

YJIT metrics from the ruby-bench suite using Ruby a8c829e7f0.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.3% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
On railsbench it is
  • 104.8% faster than CRuby 3.5.0dev
  • 9.6% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 28 minutes
aarch64 runtime: 3 hours, 48 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 86 50 183 50 208
chunky-png 5 31 5 32 50 14 50 26
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 389 50 597 50 525
liquid-compile 5 408 5 468 50 547 50 687
liquid-render 5 170 5 168 50 408 50 372
lobsters 5 20 5 20 50 10 50 10
mail 5 190 5 181 50 236 50 227
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 213 50 221
ruby-lsp 5 143 5 147 50 234 50 246
sequel 5 419 5 433 50 576 50 602
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 146 50 130
blurhash 5 82 5 88 50 127 50 145
erubi 5 119 5 139 50 87 50 130
etanni 5 90 5 69 50 52 50 33
fannkuchredux 5 52 5 57 50 98 50 91
fluentd 5 62 5 61 50 24 50 29
graphql 5 341 5 456 50 456 50 920
graphql-native 5 50 5 81 50 11 50 65
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 87 50 90
nbody 5 249 5 264 50 585 50 704
nqueens 5 120 5 129 50 74 50 542
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 186 50 621 50 737
protoboeuf-encode 5 179 5 197 50 327 50 777
rack 5 419 5 436 50 640 50 692
ruby-json 5 83 5 84 50 50 50 53
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 52 50 163 50 139
tinygql 5 40 5 43 50 39 50 48
30k_ifelse 5 28 5 28 50 215 50 185
30k_methods 5 39 5 38 50 481 50 471
attr_accessor 5 157 5 204 50 1718 50 1913
cfunc_itself 5 357 5 370 50 1137 50 1258
fib 5 127 5 143 50 903 50 931
getivar 5 212 5 309 50 2249 50 2395
keyword_args 5 104 5 104 50 1034 50 1243
loops-times 5 24 5 26 50 48 50 57
object-new 5 318 5 313 50 405 50 480
respond_to 5 134 5 138 50 3258 50 3908
ruby-xor 5 243 5 240 50 799 50 1277
setivar 5 361 5 382 50 3184 50 4958
setivar_object 5 353 5 338 50 672 50 633
setivar_young 5 368 5 341 50 702 50 666
str_concat 5 401 5 441 50 979 50 1114
throw 5 1270 5 1125 50 1711 50 1371

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) 1537103 1364535 203 2570 0 0% 0 0 74.435528
chunky-png (click) 319595 285895 74 1330 1 0% 0 0 39.326437
erubi-rails (click) 1936539 1689445 262 3666 22 0% 0 0 103.729051
hexapdf (click) 1514236 1352497 594 15683 43 0% 0 0 454.078557
liquid-c (click) 541618 453520 114 2228 5 0% 0 0 62.818047
liquid-compile (click) 452682 425548 146 2707 2 0% 0 0 79.665652
liquid-render (click) 648118 642879 131 2946 8 0% 0 0 81.749108
lobsters (click) 8540049 7268975 3121 63468 118 0% 0 0 2193.288756
mail (click) 857217 865503 342 7698 40 0% 0 0 219.105102
psych-load (click) 281332 232176 61 830 2 0% 0 0 24.083104
railsbench (click) 3331803 2971590 1605 19560 47 0% 0 0 562.605641
rubocop (click) 6122515 5417983 3014 63667 156 0% 6 0 1876.272662
ruby-lsp (click) 961220 887725 347 6796 44 0% 1 0 190.019383
sequel (click) 495245 421306 11 119 0 0% 0 0 3.964561
shipit (click) 7644632 6395172 3290 52516 184 0% 0 0 1708.875147
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.62292
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.033651
erubi (click) 247875 222482 5 125 0 0% 0 0 3.901181
etanni (click) 32930 35718 8 114 0 0% 0 0 3.70013
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.227195
fluentd (click) 466495 461427 7 115 0 0% 0 0 3.807961
graphql (click) 402789 367989 73 1920 19 0% 0 0 55.712722
graphql-native (click) 345837 284022 39 532 0 0% 0 0 14.221372
lee (click) 299303 234356 49 1070 0 0% 0 0 31.463641
matmul (click) 11125 4603 8 132 0 0% 0 0 4.225166
nbody (click) 13890 20235 6 238 0 0% 0 0 5.859394
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.481677
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.611389
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.509395
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.850907
rack (click) 274399 256496 35 580 0 0% 0 0 15.923986
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.713718
rubyboy (click) 688534 627807 154 6860 42 0% 0 0 173.92614
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.71875
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.851059
tinygql (click) 302588 256704 59 1031 5 0% 0 0 27.387084
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1963.809394
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 484.127082
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.08123
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.485449
fib (click) 2659 2995 3 30 0 0% 0 0 1.1019
getivar (click) 3812 6802 3 78 0 0% 0 0 1.892713
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.78639
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.74427
object-new (click) 2406 2818 2 36 0 0% 0 0 1.111476
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.087479
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.725143
setivar (click) 2783 3726 3 46 0 0% 0 0 1.253583
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.369511
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.728916
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.441862
throw (click) 5953 4624 5 53 0 0% 0 0 1.809681

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.