Ruby Benchmarks

Details for Benchmarks at 2025-09-15 03:49:39 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 94.0% faster than CRuby 3.5.0dev
  • 8.2% faster than YJIT 3.3.6
On railsbench it is
  • 104.6% faster than CRuby 3.5.0dev
  • 7.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 83 5 85 50 181 50 220
chunky-png 5 31 5 32 50 14 50 28
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 391 50 563 50 589
liquid-compile 5 411 5 457 50 540 50 712
liquid-render 5 170 5 168 50 395 50 374
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 179 50 235 50 222
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 139 5 142 50 202 50 221
ruby-lsp 5 144 5 147 50 225 50 245
sequel 5 425 5 433 50 595 50 599
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 82 50 146 50 128
blurhash 5 80 5 87 50 127 50 145
erubi 5 117 5 142 50 88 50 138
etanni 5 91 5 68 50 53 50 33
fannkuchredux 5 52 5 57 50 98 50 92
fluentd 5 62 5 63 50 25 50 26
graphql 5 332 5 452 50 470 50 907
graphql-native 5 51 5 80 50 13 50 62
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 54 50 88 50 89
nbody 5 249 5 267 50 585 50 699
nqueens 5 120 5 129 50 74 50 538
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 185 50 621 50 744
protoboeuf-encode 5 178 5 190 50 325 50 769
rack 5 427 5 435 50 649 50 714
ruby-json 5 83 5 84 50 50 50 52
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 47 5 51 50 163 50 140
tinygql 5 41 5 42 50 43 50 49
30k_ifelse 5 28 5 28 50 217 50 185
30k_methods 5 39 5 38 50 479 50 475
attr_accessor 5 157 5 197 50 1725 50 1903
cfunc_itself 5 358 5 360 50 1137 50 1258
fib 5 126 5 143 50 903 50 931
getivar 5 211 5 316 50 2246 50 2399
keyword_args 5 104 5 105 50 1034 50 1243
loops-times 5 24 5 25 50 48 50 57
object-new 5 318 5 313 50 405 50 483
respond_to 5 133 5 137 50 3256 50 3901
ruby-xor 5 245 5 239 50 800 50 1277
setivar 5 361 5 379 50 3182 50 4957
setivar_object 5 354 5 327 50 671 50 587
setivar_young 5 367 5 330 50 702 50 607
str_concat 5 400 5 452 50 979 50 1117
throw 5 1268 5 1121 50 1721 50 1403

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) 1536274 1322766 203 2570 0 0% 0 0 75.790833
chunky-png (click) 317358 275466 74 1330 1 0% 0 0 39.346183
erubi-rails (click) 1941572 1661919 263 3742 22 0% 0 0 103.58476
hexapdf (click) 1511166 1300818 593 15680 43 0% 0 0 450.773692
liquid-c (click) 540558 485409 114 2228 5 0% 0 0 62.645759
liquid-compile (click) 461207 418930 146 2689 2 0% 0 0 79.394175
liquid-render (click) 647034 559967 131 2946 8 0% 0 0 81.197886
lobsters (click) 8567983 7364058 3119 63790 118 0% 0 0 2145.097531
mail (click) 856235 823788 342 7696 40 0% 0 0 216.642634
psych-load (click) 279705 247420 61 830 2 0% 0 0 24.261631
railsbench (click) 3329146 2960269 1605 19586 47 0% 0 0 561.774654
rubocop (click) 6123107 5443080 3014 63670 156 0% 6 0 1845.900096
ruby-lsp (click) 960771 829666 347 6802 44 0% 1 0 190.72207
sequel (click) 494464 469807 11 119 0 0% 0 0 4.068283
shipit (click) 7653166 6421511 3287 52668 184 0% 0 0 1716.265934
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.644622
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.05701
erubi (click) 247089 238230 5 125 0 0% 0 0 3.805018
etanni (click) 32930 35718 8 114 0 0% 0 0 3.598409
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.108898
fluentd (click) 464199 402211 7 115 0 0% 0 0 3.772182
graphql (click) 402005 350954 73 1920 19 0% 0 0 54.357696
graphql-native (click) 345837 300426 39 532 0 0% 0 0 14.10797
lee (click) 310219 262441 49 1070 0 0% 0 0 31.57774
matmul (click) 11125 4603 8 132 0 0% 0 0 4.224264
nbody (click) 13890 20235 6 238 0 0% 0 0 5.829404
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.466317
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.502402
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.542905
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.361331
rack (click) 274678 215732 35 580 0 0% 0 0 15.428761
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.670835
rubyboy (click) 687650 618855 154 6858 42 0% 0 0 172.698978
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.600103
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.892432
tinygql (click) 300040 254223 59 1031 5 0% 0 0 27.422462
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1953.732607
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 483.251375
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.082518
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.52032
fib (click) 2659 2995 3 30 0 0% 0 0 1.041388
getivar (click) 3812 6802 3 78 0 0% 0 0 1.909011
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.795601
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.702303
object-new (click) 2406 2818 2 36 0 0% 0 0 1.083153
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.098808
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.696946
setivar (click) 2783 3726 3 46 0 0% 0 0 1.216853
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.401962
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.673053
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.417642
throw (click) 5953 4624 5 53 0 0% 0 0 1.828996

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.