Ruby Benchmarks

Details for Benchmarks at 2025-09-18 03:47:13 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.0% faster than CRuby 3.5.0dev
  • 6.0% faster than YJIT 3.3.6
On railsbench it is
  • 101.4% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 29 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 86 50 184 50 219
chunky-png 5 31 5 33 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 421 5 398 50 597 50 529
liquid-compile 5 407 5 467 50 550 50 685
liquid-render 5 171 5 163 50 406 50 382
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 183 50 251 50 233
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 140 5 140 50 201 50 219
ruby-lsp 5 143 5 146 50 227 50 248
sequel 5 421 5 431 50 595 50 595
shipit 5 10 5 10 50 10 50 10
binarytrees 5 83 5 81 50 147 50 126
blurhash 5 82 5 86 50 127 50 145
erubi 5 124 5 132 50 87 50 131
etanni 5 90 5 68 50 53 50 34
fannkuchredux 5 52 5 57 50 97 50 100
fluentd 5 62 5 61 50 23 50 29
graphql 5 348 5 454 50 467 50 925
graphql-native 5 51 5 83 50 14 50 62
lee 5 23 5 22 50 10 50 10
matmul 5 50 5 54 50 87 50 84
nbody 5 248 5 258 50 578 50 700
nqueens 5 120 5 127 50 74 50 553
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 187 50 621 50 749
protoboeuf-encode 5 178 5 203 50 325 50 767
rack 5 423 5 439 50 642 50 701
ruby-json 5 83 5 82 50 49 50 51
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 146
tinygql 5 41 5 44 50 41 50 48
30k_ifelse 5 28 5 27 50 214 50 185
30k_methods 5 39 5 38 50 477 50 470
attr_accessor 5 159 5 194 50 1732 50 1900
cfunc_itself 5 338 5 350 50 1137 50 1258
fib 5 126 5 139 50 913 50 933
getivar 5 212 5 317 50 2260 50 2423
keyword_args 5 103 5 103 50 1033 50 1243
loops-times 5 24 5 25 50 48 50 56
object-new 5 320 5 317 50 406 50 481
respond_to 5 132 5 134 50 3254 50 3900
ruby-xor 5 243 5 251 50 794 50 1273
setivar 5 361 5 362 50 3141 50 4939
setivar_object 5 352 5 316 50 672 50 580
setivar_young 5 366 5 318 50 696 50 600
str_concat 5 390 5 452 50 974 50 1124
throw 5 1267 5 1123 50 1732 50 1382

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) 1536743 1388816 203 2570 0 0% 0 0 73.656003
chunky-png (click) 316916 283361 74 1330 1 0% 0 0 38.5251
erubi-rails (click) 1942690 1629426 262 3759 22 0% 0 0 103.289737
hexapdf (click) 1514714 1328695 593 15693 43 0% 0 0 441.872167
liquid-c (click) 540924 502088 114 2228 5 0% 0 0 60.587353
liquid-compile (click) 464951 438952 146 2718 2 0% 0 0 80.096225
liquid-render (click) 647815 536062 131 2946 8 0% 0 0 80.644749
lobsters (click) 8565811 7272887 3119 63776 118 0% 0 0 2101.820153
mail (click) 857022 857280 342 7696 40 0% 0 0 215.461446
psych-load (click) 280931 256484 61 830 2 0% 0 0 24.826363
railsbench (click) 3333296 2843037 1605 19600 47 0% 0 0 555.503601
rubocop (click) 6122050 5294815 3014 63671 156 0% 6 0 1951.579667
ruby-lsp (click) 960764 870636 347 6802 44 0% 1 0 185.886225
sequel (click) 493729 469194 11 119 0 0% 0 0 4.177898
shipit (click) 7750882 6528230 3351 53888 185 0% 1 0 1727.992312
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.722055
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.669464
erubi (click) 247474 189446 5 125 0 0% 0 0 3.811783
etanni (click) 32930 35718 8 114 0 0% 0 0 3.631244
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.979485
fluentd (click) 464199 402175 7 115 0 0% 0 0 3.860357
graphql (click) 402388 367721 73 1920 19 0% 0 0 53.642374
graphql-native (click) 345729 259514 39 532 0 0% 0 0 13.999856
lee (click) 309775 278508 49 1070 0 0% 0 0 31.686197
matmul (click) 11125 4603 8 132 0 0% 0 0 4.190952
nbody (click) 13890 20235 6 238 0 0% 0 0 5.945591
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.582747
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.875026
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.690733
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 45.020028
rack (click) 271809 246169 35 580 0 0% 0 0 15.048968
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.69975
rubyboy (click) 685953 609325 154 6860 42 0% 0 0 170.606214
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.521705
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.601569
tinygql (click) 301277 239023 59 1037 5 0% 0 0 27.39303
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1932.16343
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.672703
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.057753
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.538147
fib (click) 2659 2995 3 30 0 0% 0 0 1.141605
getivar (click) 3812 6802 3 78 0 0% 0 0 1.933216
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.765341
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.830437
object-new (click) 2406 2818 2 36 0 0% 0 0 1.198584
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.183088
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.757606
setivar (click) 2783 3726 3 46 0 0% 0 0 1.266005
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.412354
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.704162
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.558632
throw (click) 5953 4624 5 53 0 0% 0 0 1.836628

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.