時間訪問代價

記錄一下,方便以后查詢

Operation Time
L1 cache reference 訪問一級緩存 0.5 ns
Branch mispredict(分支預測失敗) 5 ns
L2 cache reference 訪問二級緩存 7 ns
Mutex lock/unlock 互斥鎖\解鎖 100 ns
Main memory reference 訪問主存 100 ns
Compress 1K bytes with Zippy 壓縮1k字節 10,000 ns/0.01ms
Send 2K bytes over 1 Gbps network 在1Gbps的網絡上發送2k字節 20,000 ns/0.02ms
Read 1 MB sequentially from memory 從主存中順序讀取1MB 250,000 ns/0.25ms
Round trip within same datacenter 從數據中心內部往返一次 500,000 ns/0.5ms
Disk seek 磁盤搜索/尋道 10,000,000 ns /10ms
Read 1 MB sequentially from network 從網絡上順序讀取1M數據 10,000,000 ns/10ms
Read 1 MB sequentially from disk 從磁盤中順序讀出1MB數據 30,000,000 ns /30ms
Send packet CA->Netherlands->CA 一次遠程訪問時間 150,000,000 ns/150ms
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。