Chris Collins

Tools · dev

Latency numbers every programmer should know

Jeff Dean's and Peter Norvig's latency tables, Colin Scott's year-by-year model from 1990 to 2030, the famous squares diagram, a human-scale view, comparisons, back-of-the-envelope calculators, and AI-hardware latencies (HBM, NVLink, InfiniBand, CXL) with KV-cache hand-off and checkpoint estimates.

Added · updated 14 October 2026

Works with

How to use it

Pick a source at the top: Jeff Dean (the 2012 version of the table everyone quotes), Peter Norvig (the original, around 2001), or Colin Scott’s model, which projects every number by year — drag the slider from 1990 to 2030 and watch the CPU numbers stop shrinking in 2005 while network and SSD numbers keep falling.

The views

  • Table — every operation in ns, µs, and ms, a log-scale bar, and its multiple of an L1 cache reference. Copy it as text, Markdown, or CSV.

  • Squares diagram — the visual from Colin Scott’s page, redrawn: one black square is 1 ns; a hundred of them make one blue square (100 ns); a hundred blue make one green (10 µs); a hundred green make one red (1 ms). Each operation is drawn in the largest unit that keeps it at one square or more. Use Zoom to change the square size.

  • Human scale — scale everything so one operation (an L1 cache hit by default) takes one second: a main-memory reference becomes minutes, a disk seek months, and a transatlantic round trip years.

  • Compare — pick any two operations, including the modern extras, to see the ratio.

  • Back of the envelope — editable versions of Jeff Dean’s classic estimates: a page of 30 thumbnails read serially or in parallel, quicksorting 1 GB, moving data over a link, serial versus batched versus parallel lookups, and scanning a dataset from memory, SSD, or disk — and, for AI systems, the KV-cache hand-off from a prefill to a decode GPU, writing a training checkpoint, decode speed against human reading speed (4–6 tokens a second), and a voice assistant’s half-second round trip.

  • Modern extras — L3 hits, system calls, context switches, NVMe reads, cloud availability-zone and cross-region round trips, DNS, TLS, GPU kernel launches, and LLM tokens. AI hardware rows (filter ai-fabric): a GPU L2 hit, an HBM load (~500 ns — HBM is wide, not fast), a CXL-attached DIMM (~200 ns), an InfiniBand switch hop (~130 ns), a store into another GPU’s memory over NVLink through an NVSwitch (~0.8 µs), a small all-reduce across an NVSwitch domain, and a Grace CPU reading Hopper HBM over NVLink-C2C (~0.9 µs). Filter memory-ladder for DRAM → CXL → HBM → C2C → NVMe.

Sources

  • Peter Norvig, Teach Yourself Programming in Ten Years — the original table.

  • Jeff Dean, Designs, Lessons and Advice from Building Large Distributed Systems (LADIS 2009) and Building Software Systems at Google and Lessons Learned (Stanford, 2010), where the numbers and the thumbnail and quicksort estimates come from; collected in Jonas Bonér’s widely shared gist.

  • Colin Scott, Numbers Every Programmer Should Know By Year (source, MIT licence). This tool reimplements its trend model formula for formula, so its numbers match that page for every year. The model’s newest data points are from 2012–2014; later years are extrapolated from trend lines, and some (memory bandwidth especially) have drifted far from real hardware — compare with the modern extras.

Sources for the AI rows:

The modern extras are typical orders of magnitude, not canonical numbers: they vary widely with hardware, configuration, load, and distance. Measure your own system before relying on any of them.

Related: AI hardware calculator (memory, roofline, decode speed), Big-O, calculator (bytes and bandwidth).

Companion to AI Acceleration: From Transistors to Trillion-Parameter Models: Latency: how fast is fast enough, prefill/decode disaggregation, the latency budget and how CXL fits and the checkpoint write-storm.

Sharing

Share link copies a URL that opens this tool exactly as you have it. Hand-written links work too: ?source=scott&year=2025 picks the numbers for every tab; Squares ?box=12, Human scale ?base=mem, Compare ?a=diskSeek&b=rtt, Modern extras ?q=nvme. For example ?source=scott&year=2005.

Linking to an example

Add the tab after #: table, squares, human, compare, envelope or modern.

Parameter Meaning Example

source

Numbers for every tab: dean, norvig or scott

source=scott

year

Year for Colin Scott’s model, 1990–2030

year=2025

box

Squares diagram box size, 4–16

box=12

base

Human scale: the operation that takes one second (a row id such as l1, mem)

base=mem

a, b

Compare: two row ids, e.g. m-hbm, m-dram, m-cxl, m-nvlink, m-ib-switch, m-c2c, m-gpul2, m-nvswitch-ar, seek, wan

a=m-hbm&b=m-dram

q

Modern extras filter; also matches the tags ai-fabric and memory-ladder

q=ai-fabric

env

Envelope calculation: thumbs, qsort, transfer, fanout, scan, kv, ckpt, reading, voice

env=kv

layers, kvh, hd, tok, bytes, nvl, ib

KV hand-off: layers, KV heads, head dimension, prompt tokens, bytes per value, NVLink GB/s, InfiniBand Gb/s

env=kv&tok=128000

params, bpp, writers, wbw

Checkpoint: parameters (billions), bytes per parameter, parallel writers, GB/s per writer

env=ckpt&params=405

tps, read, ans

Reading speed: decode tokens/s, reading tokens/s, answer tokens

env=reading&tps=100

net, asr, ttft, tts, budget

Voice: network, recognition, first token, first audio and the budget, all ms

env=voice&ttft=300

n, seek, size, bw, gb, width, mis, rate, mbw, rtt, svc, batch, mem, ssd, disk, nodes

The classic envelopes' inputs, by the same names

env=thumbs&n=60

example

One of the presets below; parameters written beside it override the preset’s

example=p15-kv-handoff-8k

Presets (?example=…):

example= Shows

p13-voice-budget

Voice: recognition, the first token and the first audio under ~500 ms (open)

p13-reading-speed

Reading at 4–6 tokens/s: a 50 tokens/s stream already outpaces the reader 10× (open)

p13-hbm-vs-dram

HBM is about bandwidth, not latency: an HBM load (~500 ns) against a server DRAM access (~90 ns) (open)

p13-ai-fabric

GPU L2, HBM, NVLink, NVSwitch, InfiniBand, CXL and NVLink-C2C latencies, with sources (open)

p13-nvlink-vs-ib

A store over NVLink against one InfiniBand switch hop (open)

p15-kv-handoff-8k

KV hand-off of an 8,000-token prompt on Llama 3 70B: 2.6 GB, ~6 ms over NVLink, ~52 ms over 400 Gb/s InfiniBand (open)

p15-kv-handoff-128k

The same at 128,000 tokens: 42 GB, ~93 ms over NVLink, ~0.84 s over InfiniBand (open)

p20-checkpoint-70b

Checkpointing a 70B model at 16 bytes per parameter: 1.12 TB (open)

p16-checkpoint-405b

Llama 3 405B training state: 6.5 TB, sharded over 1,024 writers against one (open)

cxl-memory-ladder

The memory ladder: DRAM, CXL, HBM, NVLink-C2C and NVMe (open)

cxl-vs-ddr

A CXL-attached DIMM (~200 ns) against local DRAM (~90 ns) (open)

Older packed links (?s=…) still open as before.

Runs entirely in your browser; nothing you type leaves this page.