Skip to content

Instantly share code, notes, and snippets.

@OpenCoderX
Forked from jboner/latency.txt
Created May 31, 2012 12:56
Show Gist options
  • Save OpenCoderX/2843243 to your computer and use it in GitHub Desktop.
Save OpenCoderX/2843243 to your computer and use it in GitHub Desktop.
Latency numbers every programmer should know
L1 cache reference 0.5 ns || 5.0 × 10^-10 seconds
Branch mispredict 5 ns || 5.0 × 10^-9 seconds
L2 cache reference 7 ns || 7.0 × 10^-9 seconds
Mutex lock/unlock 25 ns || 2.5 × 10^-8 seconds
Main memory reference 100 ns || 1.0 × 10^-7 seconds
Compress 1K bytes with Zippy 3,000 ns || 3.0 × 10^-6 seconds
Send 2K bytes over 1 Gbps network 20,000 ns || 2.0 × 10^-5 seconds
Read 1 MB sequentially from memory 250,000 ns || 0.00025 seconds
Round trip within same datacenter 500,000 ns || 0.00050 seconds
Disk seek 10,000,000 ns || 0.01 seconds
Read 1 MB sequentially from disk 20,000,000 ns || 0.02 seconds
Send packet CA->Netherlands->CA 150,000,000 ns || 0.15 seconds
By Jeff Dean (http://research.google.com/people/jeff/):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment