Latency numbers every programmer should know, from L1 to HDD
By TechCompare · Updated · How we check
Keep your data as close to the CPU as possible, avoid random memory access on large datasets, and never read from disk in a hot path. These numbers show what each step away from the CPU costs.
Calculator
Memory & Storage Throughput Visualizer
Data to transfer: 1.0 TB
Computer memory spans 7 orders of magnitude in latency: from L1 cache at roughly 1 nanosecond to spinning HDD at roughly 10 milliseconds. Each step up the hierarchy is roughly 10-100x slower than the step below it. These numbers aren't academic. They explain why your program is slow and what to do about it.
How this is calculated
The rough latency numbers for a modern desktop CPU (2026): L1 cache ~1 ns (3-5 cycles at 4 GHz). L2 cache ~3-4 ns (12-16 cycles). L3 cache ~10-15 ns (40-60 cycles). DDR5 RAM ~50-80 ns (200-320 cycles). NVMe SSD ~50-100 µs (50,000-100,000 ns). SATA SSD ~100-200 µs. HDD ~5-15 ms (5,000,000-15,000,000 ns).
To put this in human terms: if L1 cache access were 1 second, RAM access would be about 1.3 minutes. An HDD access would be about 4 months. This is why caching works, why an SSD feels so much quicker than a hard drive, and why in-memory databases are fast.
Verdict
Cache what you read often and keep it as close to the CPU as the data allows. If an L1 access took one second, RAM would take about 1.3 minutes and an HDD read about 4 months. That ratio is why caching works and why in-memory databases feel instant.
More Latency scenarios
Related guides
Frequently asked questions
What are the memory latency numbers every programmer should know?
What does the 'if L1 cache were 1 second' analogy look like?
Why are in-memory databases so much faster?
Related tools
RAM Latency Calculator
Convert DDR3/DDR4/DDR5 timings (CL, tRCD, tRP, tRAS) into true latency in nanoseconds.
Use toolRAID Calculator
Calculate usable capacity and fault tolerance for RAID 0, 1, 5, 6, and 10.
Use toolDisplay Bandwidth Calculator
Check display bandwidth for HDMI, DisplayPort, USB-C, Thunderbolt, and USB4.
Use tool