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

L1 Cache2,000,000 MB/s
L3 Cache500,000 MB/s
DDR5 RAM (1 channel)48,000 MB/s
DDR4 RAM (1 channel)25,600 MB/s
NVMe Gen 514,000 MB/s
NVMe Gen 47,000 MB/s
NVMe Gen 33,500 MB/s
SATA SSD550 MB/s
HDD160 MB/s

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.

Hardware tier
Fundamentals
Memory hierarchy fundamentals
Topic focus
Memory latency numbers
latency-numbers

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

Frequently asked questions

What are the memory latency numbers every programmer should know?
Roughly: L1 cache 1 ns, L2 3-4 ns, L3 10-15 ns, DDR5 RAM 50-80 ns, NVMe SSD 50-100 microseconds, SATA SSD 100-200 microseconds, HDD 5-15 milliseconds. Every tier is about 10-100x slower than the one above it. Knowing the ladder tells you where a slow program is actually waiting.
What does the 'if L1 cache were 1 second' analogy look like?
At that scale, an L2 access is a 3-4 second pause, L3 is 10-15 seconds, RAM is about 1.3 minutes, an NVMe SSD read is a day and change, and a spinning HDD read is about 4 months. The analogy shows why reading from disk in a hot code path is costly even when the profiler says I/O is a small slice.
Why are in-memory databases so much faster?
They skip the 50-100 microsecond NVMe trip and keep the working set in RAM at 50-80 nanoseconds, roughly 1,000 times faster per random access. A disk-backed database with a good cache layer narrows the gap for hot data, but the first uncached read still pays the disk latency. That gap is the whole case for keeping the working set in RAM.