Latency Numbers Every Developer Should Know

Within the industry they are commonly known as "napkin estimations", They are there to serve as a guide for various effects on the ways you choose to communicate.

OperationOriginal LatencyScaled "Human" Time
L1 cache reference0.5 ns1.0 seconds
Branch mispredict5 ns10.0 seconds
L2 cache reference7 ns14.0 seconds
Mutex lock/unlock25 ns50.0 seconds
Main memory reference100 ns3.3 minutes
Compress 1K (Zippy)10,000 ns5.6 hours
Send 1KB (1 Gbps network)10,000 ns5.6 hours
Read 4KB from SSD (random)150,000 ns3.5 days
Read 1MB from memory (seq.)250,000 ns5.8 days
Round trip (same datacenter)500,000 ns11.6 days
Read 1MB from SSD (seq.)1,000,000 ns23.1 days
HDD seek10,000,000 ns7.6 months
Read 1MB (1 Gbps network)10,000,000 ns7.6 months
Read 1MB from HDD (seq.)30,000,000 ns1.9 years
Round trip (CA -> Netherlands)150,000,000 ns9.5 years

Feel the Scale: A Human-Time Analogy

It's hard to grasp the difference between 0.5 ns and 500,000 ns. Let's scale it up. Click a button below to set an operation's time cost to "1 Second" and see how long everything else would take in human time.

Latency Numbers Visualized

Latency Numbers Visualized

Figure: Visualization of Latency Numbers

Watch: Latency Numbers Explained

For a deeper dive into these latency numbers and their practical implications, check out this excellent video explanation that breaks down why these numbers matter for system design and performance optimization.

Notes & Units

  • 1 ns (nanosecond) = 10-9 seconds
  • 1 µs (microsecond) = 10-6 seconds = 1,000 ns
  • 1 ms (millisecond) = 10-3 seconds = 1,000 µs

Original data collected from various industry blogs and GitHub repositories. This interactive visualization is based on that common knowledge.