Skip to content

Instantly share code, notes, and snippets.

@victoriadrake
Created February 28, 2020 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victoriadrake/26739df97109a04484336ed9a083bcaf to your computer and use it in GitHub Desktop.
Save victoriadrake/26739df97109a04484336ed9a083bcaf to your computer and use it in GitHub Desktop.
Peter Norvig‘s Latency Numbers
Task Time
CPU execute typical instruction 1/1,000,000,000 sec = 1 nanosec
CPU fetch from L1 cache memory 0.5 nanosec
CPU branch misprediction 5 nanosec
CPU fetch from L2 cache memory 7 nanosec
RAM Mutex lock/unlock 25 nanosec
RAM fetch from main memory 100 nanosec
Network send 2K bytes over 1Gbps network 20,000 nanosec
RAM read 1MB sequentially from memory 250,000 nanosec
Disk fetch from new disk location (seek) 8,000,000 nanosec (8ms)
Disk read 1MB sequentially from disk 20,000,000 nanosec (20ms)
Network send packet US to Europe and back 150,000,000 nanosec (150ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment