后端优化 — Numbers You Should Know

原文地址:我对后端优化的一点想法by童家旺(2012DTCC)

  • L1 cache reference 0.5 ns(1GHz CPU)
  • Branch mispredict 5 ns
  • L2 cache reference 7 ns
  • Mutex lock/unlock 25 ns
  • Main memeory reference 100 ns
  • Compress 1k bytes with Zippy 3,000 ns
  • Send 2k bytes over 1Gbps network 20,000 ns
  • Read 1MB sequentialy from main memory 250,000 ns
  • Round trip with same datacenter 500,000 ns
  • Disk seek 10,000,000 ns
  • Read 1 MB sequentially from disk 20,000,000 ns
  • Send packet CA -> Netherlands -> CA 150,000,000 ns

Comments are closed.