Essential Latency Numbers Every Web Developer Must Know
This article explores critical latency metrics—from nanosecond-level CPU operations to intercontinental network delays—illustrating how each contributes to web performance, and provides real‑world measurements for various connection types, data processing tasks, and user‑perceived response times to help developers optimize user experience.
In modern web development, understanding and optimizing latency is crucial for delivering an excellent user experience. Every millisecond can affect satisfaction, whether it’s page load, resource response, or interaction feedback.
Below are three well‑known latency benchmarks from abroad:
Peter Norvig – https://norvig.com/21-days.html#answers
Jeff Dean – https://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf
University of California, Berkeley – https://colin-scott.github.io/personal_website/research/interactive_latency.html
Typical latency figures (in nanoseconds unless otherwise noted):
Execute a typical instruction: 1 ns
Load from L1 cache: 0.5 ns
Branch misprediction penalty: 5 ns
Load from L2 cache: 7 ns
Mutex lock/unlock: 25 ns
Load from main memory: 100 ns
Send 2 KB over a 1 Gbps network: 20 000 ns
Sequentially read 1 MB from memory: 250 000 ns
Seek to a new disk location: 8 000 000 ns
Continuous read of 1 MB from disk: 20 000 000 ns
Round‑trip packet from the US to Europe and back: 150 ms (150 000 000 ns)
Note: 1 ns = 10⁻⁹ s, 1 ms = 10⁻³ s = 1 000 µs = 1 000 000 ns.
Interestingly, when network speed is sufficiently high, reading data can be faster than accessing memory. The performance gap between memory, SSD, and HDD is roughly an order of magnitude.
Vercel‑Provided Latency Numbers (2023 Android measurement)
1. Network Impact
Wi‑Fi latency: 1–4 ms (affects TTFB, FCP, LCP)
5G high‑frequency: 1–5 ms (affects TTFB, FCP, LCP)
5G mid‑frequency (poor signal or tower overload): 10–30 ms
4G LTE: 15–50 ms
3G: ~150 ms
Inter‑continental round‑trip (single region deployment): ~150 ms
Intra‑continental city‑to‑city (≈5 000 km): ~33 ms
2. Data Processing
Service or database within the same cloud region: ~10 ms
Parse 1 MB CSS: ~100 ms (affects FCP, LCP)
Parse 1 MB HTML: ~120 ms (affects FCP, LCP)
Parse 1 MB JavaScript: ~150 ms (affects INP, FCP, LCP)
3. User Experience
Perceived instantaneous response threshold: 40–80 ms (affects INP)
Perceived smooth frame rate (60 fps): 16 ms per frame; latency 5–10 ms for rendering
Perceived slow response threshold: 200 ms (INP “needs improvement”)
Original source: https://vercel.com/blog/latency-numbers-every-web-developer-should-know
Code Mala Tang
Read source code together, write articles together, and enjoy spicy hot pot together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.