Ruby Benchmarks

Details for Benchmarks at 2025-09-17 03:46:28 UTC

YJIT metrics from the ruby-bench suite using Ruby 6eb9dfcbdc.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.5% faster than CRuby 3.5.0dev
  • 6.1% faster than YJIT 3.3.6
On railsbench it is
  • 107.7% faster than CRuby 3.5.0dev
  • 6.4% 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 82 5 85 50 181 50 218
chunky-png 5 31 5 31 50 15 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 383 50 587 50 526
liquid-compile 5 407 5 464 50 559 50 707
liquid-render 5 174 5 167 50 408 50 392
lobsters 5 20 5 20 50 10 50 10
mail 5 187 5 174 50 250 50 218
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 138 5 140 50 200 50 220
ruby-lsp 5 143 5 143 50 230 50 239
sequel 5 431 5 435 50 594 50 603
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 147 50 129
blurhash 5 82 5 87 50 127 50 145
erubi 5 118 5 139 50 86 50 139
etanni 5 90 5 69 50 54 50 34
fannkuchredux 5 52 5 57 50 97 50 95
fluentd 5 62 5 63 50 25 50 28
graphql 5 341 5 454 50 460 50 918
graphql-native 5 51 5 79 50 13 50 63
lee 5 22 5 23 50 10 50 10
matmul 5 50 5 54 50 87 50 88
nbody 5 247 5 265 50 578 50 702
nqueens 5 120 5 129 50 70 50 546
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 181 50 621 50 753
protoboeuf-encode 5 173 5 195 50 326 50 767
rack 5 428 5 432 50 641 50 704
ruby-json 5 83 5 83 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 139
tinygql 5 41 5 43 50 40 50 48
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 38 50 474 50 473
attr_accessor 5 159 5 204 50 1730 50 1920
cfunc_itself 5 338 5 350 50 1137 50 1258
fib 5 127 5 143 50 912 50 933
getivar 5 212 5 314 50 2261 50 2425
keyword_args 5 104 5 105 50 1033 50 1243
loops-times 5 24 5 25 50 48 50 51
object-new 5 320 5 314 50 406 50 481
respond_to 5 133 5 140 50 3255 50 3891
ruby-xor 5 244 5 195 50 795 50 1271
setivar 5 361 5 382 50 3160 50 4961
setivar_object 5 352 5 330 50 671 50 584
setivar_young 5 368 5 333 50 697 50 602
str_concat 5 391 5 445 50 979 50 1119
throw 5 1263 5 1125 50 1739 50 1383

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) 1535625 1355030 203 2570 0 0% 0 0 73.308415
chunky-png (click) 317358 275466 74 1330 1 0% 0 0 38.549602
erubi-rails (click) 1938330 1657657 263 3717 22 0% 0 0 102.008921
hexapdf (click) 1515850 1329903 593 15699 43 0% 0 0 439.759955
liquid-c (click) 541402 494783 114 2243 5 0% 0 0 61.330401
liquid-compile (click) 464989 414765 146 2738 2 0% 0 0 80.046568
liquid-render (click) 647815 536062 131 2946 8 0% 0 0 81.341896
lobsters (click) 8559071 7279741 3118 63654 118 0% 0 0 2096.069165
mail (click) 854631 830766 342 7696 40 0% 0 0 215.885488
psych-load (click) 280109 247612 61 830 2 0% 0 0 24.36066
railsbench (click) 3327143 2973760 1605 19597 47 0% 0 0 555.688511
rubocop (click) 6122193 5327648 3014 63666 156 0% 6 0 1828.962551
ruby-lsp (click) 960713 821705 347 6795 44 0% 1 0 183.986658
sequel (click) 493766 444733 11 119 0 0% 0 0 4.12313
shipit (click) 7748107 6394462 3352 53872 185 0% 1 0 1777.089281
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.603641
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.112386
erubi (click) 238100 235270 5 125 0 0% 0 0 3.855171
etanni (click) 32930 35718 8 114 0 0% 0 0 3.761424
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.934294
fluentd (click) 465649 419788 7 115 0 0% 0 0 3.814133
graphql (click) 402005 350954 73 1920 19 0% 0 0 53.948429
graphql-native (click) 346537 301083 39 532 0 0% 0 0 13.83696
lee (click) 311410 279822 49 1070 0 0% 0 0 30.922475
matmul (click) 11125 4603 8 132 0 0% 0 0 4.160775
nbody (click) 13890 20235 6 238 0 0% 0 0 5.904587
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.305217
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.221096
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.70932
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.594962
rack (click) 274678 232148 35 580 0 0% 0 0 15.04759
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.62262
rubyboy (click) 687590 635319 154 6860 42 0% 0 0 167.857164
rubykon (click) 146229 162118 137 2070 3 0% 0 0 55.547698
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.533521
tinygql (click) 299872 278725 59 1031 5 0% 0 0 27.379871
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1933.954707
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 479.060767
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.076489
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.502794
fib (click) 2659 2995 3 30 0 0% 0 0 1.1141
getivar (click) 3812 6802 3 78 0 0% 0 0 1.904285
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.832212
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.7755
object-new (click) 2406 2818 2 36 0 0% 0 0 1.119394
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.097003
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.715978
setivar (click) 2783 3726 3 46 0 0% 0 0 1.230208
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.376697
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.711115
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.45498
throw (click) 5953 4624 5 53 0 0% 0 0 1.768059

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.