How fast is your computer, really? Numbers every programmer should know.
Your computer does things at wildly different speeds. Reading from memory? Nanoseconds. Reading from disk? Milliseconds. That's a million times slower! Knowing these rough numbers helps you build faster software without over-engineering.
If reading from CPU cache took 1 second, here's how long everything else would take:
Drag to rotate. Hover over arcs to see latency between cloud regions.
| Source | Destination | Distance | Latency | Bandwidth |
|---|---|---|---|---|
| ๐บ๐ธ US East | ๐บ๐ธ US Central | 1,500 km | 25ms | ~25 MB/s |
| ๐บ๐ธ US Central | ๐บ๐ธ US West | 2,400 km | 40ms | ~25 MB/s |
| ๐บ๐ธ US East | ๐บ๐ธ US West | 3,700 km | 60ms | ~25 MB/s |
| ๐ฎ๐ช EU West | ๐ฉ๐ช EU Central | 1,100 km | 20ms | ~25 MB/s |
| ๐บ๐ธ US East | ๐ฎ๐ช EU West | 5,900 km | 80ms | ~25 MB/s |
| ๐บ๐ธ US Central | ๐ฎ๐ช EU West | 6,800 km | 100ms | ~25 MB/s |
| ๐น๐ผ Asia East | ๐ฏ๐ต Tokyo | 2,100 km | 50ms | ~25 MB/s |
| ๐น๐ผ Asia East | ๐ธ๐ฌ Singapore | 3,200 km | 70ms | ~25 MB/s |
| ๐ธ๐ฌ Singapore | ๐ฆ๐บ Sydney | 6,300 km | 100ms | ~25 MB/s |
| ๐บ๐ธ US East | ๐ง๐ท Sรฃo Paulo | 7,700 km | 120ms | ~25 MB/s |
| ๐บ๐ธ US West | ๐น๐ผ Asia East | 10,500 km | 140ms | ~25 MB/s |
| ๐บ๐ธ US West | ๐ฆ๐บ Sydney | 12,100 km | 150ms | ~25 MB/s |
| ๐ฎ๐ช EU West | ๐ธ๐ฌ Singapore | 10,800 km | 160ms | ~25 MB/s |
| ๐บ๐ธ US West | ๐ธ๐ฌ Singapore | 13,600 km | 180ms | ~25 MB/s |
Light travels ~200 km/ms in fiber optic cable. A 10,000 km route has a theoretical minimum of ~50ms one-way, ~100ms round-trip. Real-world latency is higher due to routing, switching, and protocol overhead.
Interactive visualization of regions, availability zones, and network latencies. Click on elements to see details. Packets animate between nodes to show relative speeds.
This simulation shows how data centers are organized into regions (geographic areas) containing multiple availability zones (isolated data centers). Packets animate between nodes to visualize relative network speeds.
| Connection Type | Distance | Latency | Bandwidth | Cost |
|---|---|---|---|---|
| ๐ข Same AZ (intra-zone) | <1 km | <0.5ms | 10+ Gbps | Free |
| ๐ก Cross-AZ (same region) | 10-100 km | 1-2ms | 5-10 Gbps | $0.01/GB |
| ๐ด Cross-Region (same continent) | 1,000-4,000 km | 20-60ms | ~25 MB/s | $0.02/GB |
| ๐ด Cross-Region (intercontinental) | 5,000-12,000 km | 80-180ms | ~25 MB/s | $0.05-0.10/GB |
Memorize these. They'll help you estimate if your system design makes sense.
If a CPU cycle (0.3ns) was 1 second:
Cloud pricing for the things you care about (monthly, on-demand):
| Resource | Amount | Price | With Commitment |
|---|---|---|---|
| โ๏ธ CPU (1 vCPU) | 1 core | $15/mo | $10/mo |
| ๐ง Memory | 1 GB | $2/mo | $1/mo |
| ๐ชฃ Blob Storage (S3) | 1 GB | $0.02/mo | - |
| ๐ฟ SSD (Zonal) | 1 GB | $0.20/mo | - |
| ๐ Network Egress | 1 GB | $0.10 | - |
| ๐ Logs/Traces | 1 GB | $0.50 | - |
| ๐ฎ GPU | 1 GPU | $5,000/mo | $3,000/mo |
Logging costs: 100k requests/sec ร 1KB each = 100MB/sec = 8.6TB/day = ~$4,300/mo in log storage alone!
Egress trap: Serving 1 PB/month to users = $100,000 in egress fees ๐ฑ
If your estimate needs more than 6 assumptions, you're overcomplicating it.
GB/s ร seconds = GB. Units are your sanity check.
Is it ~10ms or ~100ms? That's what matters, not 47ms vs 52ms.
Break big questions into smaller guessable pieces.