Latency numbers every engineer should know
Fourteen operations from an L1 cache hit to a packet crossing the Atlantic, drawn on a scale where you can actually see the gaps. Flip the switch to rescale everything to human time, which is when the numbers stop being trivia and start being intuition.
Runs in your browser. Nothing is sent anywhere.
- L1 cache reference0.5 ns
The fastest thing that is not already in a register.
- Branch mispredict5 ns
The pipeline guessed wrong and has to throw away its work.
- L2 cache reference7 ns
Fourteen times L1. This gap is why cache-friendly layouts win.
- Mutex lock and unlock25 ns
Cheap uncontended. Contention is what actually costs you.
- Main memory reference100 ns
200x L1. A cache miss is not a small event.
- Compress 1 KB with Zippy3 µs
Often worth it. Compressing before a network hop usually pays.
- Send 1 KB over 1 Gbps network10 µs
Bandwidth, not distance. Distance is the row at the bottom.
- Read 4 KB randomly from SSD150 µs
1,500x main memory, and still a bargain next to a disk seek.
- Read 1 MB sequentially from memory250 µs
Sequential access is where memory bandwidth shows up.
- Round trip in the same datacenter500 µs
Half a millisecond. Multiply by every service you call in a chain.
- Read 1 MB sequentially from SSD1 ms
4x reading the same megabyte from memory.
- Disk seek10 ms
A spinning platter physically moving. 20,000x main memory.
- Read 1 MB sequentially from disk20 ms
80x the same read from memory. Sequential still beats seeking.
- Packet from California to Netherlands and back150 ms
Mostly the speed of light. No hardware upgrade will ever fix this.
Bars are on a log scale. The distance between the top row and the bottom row is nine orders of magnitude, which a linear chart cannot draw.
These are the canonical figures, the set that interviews and textbooks use. They are not benchmarks of 2026 hardware and were never meant to be. SSDs and networks have improved by roughly an order of magnitude since they were written down, and one row has not moved at all, because you cannot negotiate with the speed of light.
What you memorise is the ratios. Main memory is 200 times slower than L1. A disk seek is 20,000 times slower than main memory. A round trip across the planet is 300 times slower than a round trip inside one datacenter. Hold those three and you can predict where a slow system is spending its time before you have opened a profiler.
The practical version: every layer you cross costs about two orders of magnitude. Cache, then memory, then local disk, then the network next door, then the network across the world. A request that touches all five is not slow because of your code. It is slow because of where the data lives.