Ruby Benchmarks

Details for Benchmarks at 2025-09-06 03:45:18 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.6% faster than CRuby 3.5.0dev
  • 7.0% faster than YJIT 3.3.6
On railsbench it is
  • 97.2% faster than CRuby 3.5.0dev
  • 6.2% 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 182 50 212
chunky-png 5 31 5 32 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 403 50 599 50 558
liquid-compile 5 413 5 462 50 540 50 711
liquid-render 5 171 5 169 50 409 50 361
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 183 50 250 50 226
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 137 5 142 50 199 50 221
ruby-lsp 5 143 5 148 50 233 50 246
sequel 5 432 5 432 50 601 50 596
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 146 50 131
blurhash 5 82 5 87 50 127 50 145
erubi 5 125 5 141 50 99 50 132
etanni 5 90 5 69 50 53 50 34
fannkuchredux 5 52 5 52 50 98 50 85
fluentd 5 62 5 59 50 25 50 30
graphql 5 336 5 461 50 461 50 926
graphql-native 5 51 5 78 50 13 50 62
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 51 50 88 50 81
nbody 5 249 5 256 50 585 50 703
nqueens 5 120 5 125 50 74 50 544
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 178 5 187 50 621 50 753
protoboeuf-encode 5 179 5 203 50 329 50 764
rack 5 424 5 438 50 646 50 701
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 48 5 48 50 163 50 139
tinygql 5 40 5 44 50 39 50 48
30k_ifelse 5 28 5 28 50 216 50 186
30k_methods 5 39 5 38 50 477 50 472
attr_accessor 5 157 5 172 50 1721 50 1856
cfunc_itself 5 358 5 365 50 1137 50 1258
fib 5 127 5 143 50 903 50 931
getivar 5 212 5 322 50 2251 50 2413
keyword_args 5 104 5 104 50 1034 50 1243
loops-times 5 24 5 25 50 48 50 56
object-new 5 318 5 308 50 405 50 462
respond_to 5 133 5 136 50 3256 50 3892
ruby-xor 5 245 5 242 50 799 50 1278
setivar 5 361 5 343 50 3190 50 4918
setivar_object 5 353 5 301 50 670 50 569
setivar_young 5 367 5 303 50 702 50 589
str_concat 5 397 5 443 50 980 50 1208
throw 5 1271 5 1125 50 1727 50 1399

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 1380931 203 2570 0 0% 0 0 74.849854
chunky-png (click) 317486 275500 74 1322 1 0% 0 0 39.160635
erubi-rails (click) 1938692 1571098 263 3755 22 0% 0 0 104.883322
hexapdf (click) 1513589 1335431 593 15675 43 0% 0 0 455.159413
liquid-c (click) 540364 501576 114 2230 5 0% 0 0 61.819635
liquid-compile (click) 464041 421248 146 2714 2 0% 0 0 79.97037
liquid-render (click) 646993 527170 131 2946 8 0% 0 0 81.338958
lobsters (click) 8557938 7429556 3120 63712 118 0% 0 0 2149.411218
mail (click) 855942 823472 342 7696 40 0% 0 0 216.392208
psych-load (click) 281694 240720 61 830 2 0% 0 0 24.753457
railsbench (click) 3334051 2996884 1605 19656 47 0% 0 0 561.137286
rubocop (click) 6123061 5359574 3014 63650 157 0% 6 0 1969.746185
ruby-lsp (click) 959652 894118 346 6774 43 0% 1 0 189.450539
sequel (click) 495245 454074 11 119 0 0% 0 0 4.166617
shipit (click) 7636915 6406709 3290 52568 184 0% 0 0 1698.029693
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.630665
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.112346
erubi (click) 247875 230674 5 125 0 0% 0 0 3.896339
etanni (click) 32930 35718 8 114 0 0% 0 0 3.64959
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.127779
fluentd (click) 466005 436347 7 115 0 0% 0 0 3.837416
graphql (click) 400321 349419 73 1920 19 0% 0 0 55.59162
graphql-native (click) 346085 292521 39 532 0 0% 0 0 14.238971
lee (click) 309879 286652 49 1070 0 0% 0 0 32.007218
matmul (click) 11125 4603 8 132 0 0% 0 0 4.162722
nbody (click) 13890 20235 6 238 0 0% 0 0 5.844453
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.423333
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.898425
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.452528
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.578498
rack (click) 273604 198413 35 580 0 0% 0 0 15.59071
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.714787
rubyboy (click) 688783 652518 154 6858 42 0% 0 0 173.326517
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.576962
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.97733
tinygql (click) 301055 263285 59 1031 5 0% 0 0 27.82775
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1949.573909
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 483.327993
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.053215
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.520005
fib (click) 2659 2995 3 30 0 0% 0 0 1.0909
getivar (click) 3812 6802 3 78 0 0% 0 0 1.931598
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.802506
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.755794
object-new (click) 2406 2818 2 36 0 0% 0 0 1.067204
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.121919
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.717779
setivar (click) 2783 3726 3 46 0 0% 0 0 1.273379
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.439677
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.682469
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.502115
throw (click) 5953 4624 5 53 0 0% 0 0 1.839402

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.