The Great Cross-Cloud Ruby Benchmark

Comparing iteration times across 4 machine types on several public clouds. Each dot is one non-warmup iteration.

This site was borne of my continuous frustration at Speedshop of clients running on old generation AWS instances, when I knew "free speed" was on the table. This page simply runs ruby-bench, a series of mostly CPU-bound benchmarks maintained by Ruby core and the YJIT developers. We run across multiple instances to reduce the effect of noisy neighbors.

All benchmarks were run on November 28, 2025 at 14:33 UTC with YJIT enabled on Ruby 3.4.7. View the code for this page here.

c6g-medium c8g-medium c8i-large m8a-medium
0%
300%+ (% slower than fastest)
Benchmark c6g-medium c8g-medium c8i-large m8a-medium
ms ±% vs best ms ±% vs best ms ±% vs best ms ±% vs best
all 34920 +258.1% 16993 +74.3% 11670 +19.7% 9752
30k_ifelse 260 ±1.3 +390.6% 144 ±1.2 +171.7% 85 ±0.4 +60.4% 53 ±0.5
30k_methods 182 ±1.0 +574.1% 90 +233.3% 38 ±0.3 +40.7% 27 ±0.4
activerecord 312 ±1.4 +294.9% 145 ±1.1 +83.5% 85 ±0.1 +7.6% 79 ±0.3
addressable-equality 1007 ±2.2 +253.3% 452 ±0.3 +58.6% 344 ±0.2 +20.7% 285 ±0.5
addressable-getters 277 ±2.0 +269.3% 124 ±1.0 +65.3% 92 ±0.3 +22.7% 75 ±0.5
addressable-join 537 ±2.2 +267.8% 249 ±1.1 +70.5% 178 ±0.1 +21.9% 146 ±0.2
addressable-merge 241 ±1.4 +265.2% 108 ±0.4 +63.6% 77 ±0.3 +16.7% 66 ±0.5
addressable-new 115 ±1.0 +259.4% 54 ±0.7 +68.8% 36 ±0.3 +12.5% 32 ±0.5
addressable-normalize 562 ±1.8 +249.1% 264 ±1.5 +64.0% 193 +19.9% 161 ±0.3
addressable-parse 397 ±1.4 +242.2% 184 ±0.4 +58.6% 141 ±0.5 +21.6% 116 ±0.7
addressable-setters 221 ±1.3 +245.3% 104 ±0.9 +62.5% 75 ±0.3 +17.2% 64 ±0.3
addressable-to-s 266 ±1.2 +259.5% 123 ±0.7 +66.2% 91 ±0.1 +23.0% 74 ±0.4
attr_accessor 103 ±14.8 +1616.7% 19 ±8.2 +216.7% 9 ±6.0 +50.0% 6 ±3.8
binarytrees 364 ±2.0 +198.4% 178 ±1.0 +45.9% 151 ±0.2 +23.8% 122 ±0.5
blurhash 232 ±1.0 +186.4% 137 ±0.8 +69.1% 94 ±0.1 +16.0% 81 ±0.4
cfunc_itself 32 ±1.3 +300.0% 26 ±0.7 +225.0% 14 ±0.3 +75.0% 8 ±0.4
chunky-png 698 ±0.8 +243.8% 368 ±1.2 +81.3% 252 ±0.3 +24.1% 203 ±0.2
erubi 317 ±1.2 +233.7% 151 ±0.6 +58.9% 126 ±0.1 +32.6% 95 ±0.4
erubi-rails 1794 ±1.7 +338.6% 741 ±2.1 +81.2% 474 ±0.2 +15.9% 409 ±1.8
etanni 496 ±0.6 +249.3% 221 ±0.8 +55.6% 192 ±0.5 +35.2% 142 ±0.3
fannkuchredux 647 ±0.2 +182.5% 429 ±1.2 +87.3% 237 ±11.3 +3.5% 229 ±13.4
fib 77 ±1.0 +413.3% 36 ±0.4 +140.0% 19 ±0.3 +26.7% 15 ±0.2
fluentd 952 ±1.4 +186.7% 432 ±1.0 +30.1% 354 ±1.5 +6.6% 332 ±4.4
getivar 43 ±5.5 +975.0% 15 ±5.0 +275.0% 7 ±3.9 +75.0% 4 ±1.6
graphql 87 ±0.6 +222.2% 41 ±0.4 +51.9% 31 ±0.2 +14.8% 27 ±0.2
graphql-native 726 ±2.3 +189.2% 350 ±1.0 +39.4% 315 ±0.3 +25.5% 251 ±0.6
hexapdf 2724 ±1.2 +211.0% 1371 ±1.3 +56.5% 1039 ±1.6 +18.6% 876 ±1.3
keyword_args 55 ±1.3 +358.3% 29 ±0.8 +141.7% 15 ±0.4 +25.0% 12 ±0.5
knucleotide 281 ±1.1 +175.5% 151 ±0.9 +48.0% 124 ±0.3 +21.6% 102 ±0.9
lee 1571 ±2.3 +217.4% 747 ±1.6 +50.9% 619 ±0.7 +25.1% 495 ±1.1
liquid-c 91 ±1.6 +313.6% 39 ±0.8 +77.3% 29 ±0.3 +31.8% 22 ±0.3
liquid-compile 105 ±1.7 +262.1% 46 ±0.7 +58.6% 34 ±0.3 +17.2% 29 ±0.6
liquid-render 135 ±0.8 +297.1% 62 ±0.6 +82.4% 42 ±0.2 +23.5% 34 ±0.5
lobsters 1326 ±1.2 +203.4% 759 ±2.5 +73.7% 521 ±0.7 +19.2% 437 ±1.3
loops-times 704 ±2.2 +437.4% 287 ±0.6 +119.1% 186 ±0.8 +42.0% 131 ±0.5
mail 181 ±1.0 +241.5% 87 ±0.8 +64.2% 71 ±0.3 +34.0% 53 ±0.5
matmul 435 ±0.2 +343.9% 185 ±0.7 +88.8% 125 ±0.3 +27.6% 98 ±0.4
nbody 73 ±0.9 +284.2% 38 ±0.4 +100.0% 22 ±0.2 +15.8% 19 ±0.4
nqueens 106 ±0.4 +341.7% 56 ±0.8 +133.3% 33 ±0.1 +37.5% 24 ±0.2
object-new 199 ±2.6 +221.0% 95 ±1.3 +53.2% 81 ±0.7 +30.6% 62 ±0.8
optcarrot 3288 ±1.1 +315.2% 1621 ±0.9 +104.7% 865 ±0.8 +9.2% 792 ±0.8
protoboeuf 90 ±1.1 +246.2% 44 ±0.9 +69.2% 29 ±0.2 +11.5% 26 ±0.5
protoboeuf-encode 78 ±0.6 +333.3% 36 ±0.6 +100.0% 21 ±0.3 +16.7% 18 ±0.5
psych-load 2493 ±1.4 +230.6% 1328 ±1.2 +76.1% 893 ±0.3 +18.4% 754 ±0.9
rack 96 ±0.4 +269.2% 42 ±0.4 +61.5% 28 ±0.3 +7.7% 26 ±0.3
railsbench 2675 ±1.2 +223.1% 1388 ±1.6 +67.6% 1063 ±0.6 +28.4% 828 ±0.9
respond_to 32 ±1.3 +966.7% 10 ±0.7 +233.3% 4 ±0.4 +33.3% 3 ±0.5
rubocop 257 ±4.1 +301.6% 125 ±1.6 +95.3% 71 ±0.6 +10.9% 64 ±1.1
ruby-json 515 ±1.8 +202.9% 244 ±0.9 +43.5% 213 ±0.2 +25.3% 170 ±0.4
ruby-lsp 208 ±0.9 +225.0% 97 ±0.7 +51.6% 72 ±0.3 +12.5% 64 ±0.8
ruby-xor 48 ±0.7 +380.0% 19 ±0.4 +90.0% 13 ±0.1 +30.0% 10 ±0.1
rubyboy 3243 ±1.0 +336.5% 1575 ±0.8 +112.0% 809 ±0.5 +8.9% 743 ±1.2
rubykon 1001 ±1.2 +212.8% 504 ±1.2 +57.5% 373 ±0.5 +16.6% 320 ±1.2
send_bmethod 18 ±1.0 +800.0% 6 ±0.7 +200.0% 3 ±0.4 +50.0% 2 ±0.4
send_cfunc_block 186 ±1.4 +353.7% 89 ±0.9 +117.1% 51 ±0.5 +24.4% 41 ±0.5
send_rubyfunc_block 13 ±0.9 +1200.0% 5 ±0.7 +400.0% 2 ±0.5 +100.0% 1 ±0.8
sequel 97 ±1.4 +304.2% 44 ±0.6 +83.3% 34 ±0.2 +41.7% 24 ±0.4
setivar 21 ±3.7 +950.0% 6 ±2.9 +200.0% 3 ±2.5 +50.0% 2 ±1.0
setivar_object 190 ±3.6 +512.9% 65 ±6.0 +109.7% 40 ±3.7 +29.0% 31 ±3.5
setivar_young 173 ±3.5 +517.9% 49 ±5.5 +75.0% 38 ±3.2 +35.7% 28 ±2.9
str_concat 57 ±1.1 +418.2% 24 ±0.6 +118.2% 16 ±0.2 +45.5% 11 ±0.5
structaref 81 ±12.2 +1250.0% 20 ±8.1 +233.3% 10 ±5.7 +66.7% 6 ±2.9
structaset 159 ±8.4 +511.5% 51 ±4.4 +96.2% 44 ±2.6 +69.2% 26 ±1.6
sudoku 313 ±1.4 +353.6% 137 ±0.5 +98.6% 95 ±0.4 +37.7% 69 ±0.5
throw 37 ±0.7 +236.4% 18 ±0.5 +63.6% 16 ±0.2 +45.5% 11 ±0.3
tinygql 620 ±1.9 +233.3% 309 ±0.8 +66.1% 213 ±0.3 +14.5% 186 ±0.6
c6g-medium c8g-medium c8i-large m8a-medium