Post · 1 min read· p. 1367

How long computer operations take

The following table is from Peter Norvig’s essay Teach Yourself Programming in Ten Years. All times are in units of nanoseconds.

execute typical instruction1
fetch from L1 cache memory0.5
branch misprediction5
fetch from L2 cache memory7
Mutex lock/unlock25
fetch from main memory100
send 2K bytes over 1Gbps network20,000
read 1MB sequentially from memory250,000
fetch from new disk location (seek)8,000,000
read 1MB sequentially from disk20,000,000
send packet US to Europe and back150,000,000