任何程序员应该记住的性能指标 
Numbers Everyone Should Know 
L1 cache reference                         0.5 ns 
Branch mispredict                            5 ns 
L2 cache reference                           7 ns 
Mutex lock/unlock                           25 ns 
Main memory reference                      100 ns            0.1 us 
Compress 1K bytes with Zippy             3,000 ns            3   us     0.003 ms 
Send 2K bytes over 1 Gbps network       20,000 ns           20   us     0.02  ms 
Read 1 MB sequentially from memory     250,000 ns          250   us     0.25  ms 
Round trip within same datacenter      500,000 ns          500   us     0.5   ms 
Disk seek                           10,000,000 ns       10,000   us    10     ms 
Read 1 MB sequentially from disk    20,000,000 ns       20,000   us    20     ms 
Send packet CA->Netherlands->CA    150,000,000 ns      150,000   us   150     ms 

posted on 2017-10-11 20:52  sidesky  阅读(293)  评论(0编辑  收藏  举报