Latency Comparison Numbers--------------------------L1 cache reference 0.5 nsBranch mispredict 5 nsL2 cache reference 7 ns 14x L1 cacheMutex lock/unlock 25 nsMain memory reference 100 ns 20x L2 cache, 200x L1 cacheCompress 1K bytes with Zippy 3,000 nsSend 1K bytes over 1 Gbps network 10,000 ns 0.01 msRead 4K randomly from SSD* 150,000 ns 0.15 msRead 1 MB sequentially from memory 250,000 ns 0.25 msRound trip within same datacenter 500,000 ns 0.5 msRead 1 MB sequentially from SSD* 1,000,000 ns 1 ms 4X memoryDisk seek 10,000,000 ns 10 ms 20x datacenter roundtripRead 1 MB sequentially from disk 20,000,000 ns 20 ms 80x memory, 20X SSDSend packet CA->Netherlands->CA 150,000,000 ns 150 msNotes-----1 ns = 10-9 seconds1 ms = 10-3 seconds* Assuming ~1GB/sec SSDCredit------By Jeff Dean: http://research.google.com/people/jeff/Originally by Peter Norvig: http://norvig.com/21-days.html#answersContributions-------------Some updates from: https://gist.github.com/2843375Great 'humanized' comparison version: https://gist.github.com/2843375Visual comparison chart: http://i.imgur.com/k0t1e.pngNice animated presentation of the data: http://prezi.com/pdkvgys-r0y6/latency-numbers-for-programmers-web-development/![]()
以下图片参考自:
![](https://img-my.csdn.net/uploads/201302/25/1361761537_9743.jpg)
以下图片参考自:intel core i7
![](https://img-my.csdn.net/uploads/201302/25/1361761707_8862.jpg)