Google's famous table — memorize these. They justify every architecture decision. Why cache? RAM is 300,000× faster than disk.
| Operation | Latency | In Human Terms | Category |
|---|---|---|---|
| L1 cache reference | 0.5 ns | Blink of an eye = 0.5 ns here | Instant |
| Branch mispredict | 5 ns | 10× L1 | Instant |
| L2 cache reference | 7 ns | 14× L1 | Very fast |
| Mutex lock/unlock | 100 ns | — | Fast |
| Main memory (RAM) reference | 100 ns | 200× L1 | Fast |
| Compress 1K bytes (Snappy) | 10,000 ns | 10 µs | Medium |
| Send 2KB over 1 Gbps network | 20,000 ns | 20 µs | Medium |
| Read 1MB sequentially from RAM | 250,000 ns | 250 µs | Medium |
| Round trip within same datacenter | 500,000 ns | 0.5 ms | Noticeable |
| Disk seek (HDD) | 10,000,000 ns | 10 ms — 20,000× RAM | Slow |
| Read 1MB sequentially from network | 10,000,000 ns | 10 ms | Slow |
| Read 1MB sequentially from disk | 30,000,000 ns | 30 ms | Slow |
| Packet: California → Netherlands → CA | 150,000,000 ns | 150 ms | Very slow |