Yuv*_*dam 11 architecture hardware computer-architecture
以Peter Norvig的建议为例,我在思考这个问题:
在有和没有缓存未命中的情况下,从内存中获取一个字需要多长时间?
(假设标准硬件和架构.为了简化计算,假设1Ghz时钟)
Eli*_*sky 15
看起来像Norvig 自己回答:
execute typical instruction 1/1,000,000,000 sec = 1 nanosec
fetch from L1 cache memory 0.5 nanosec
branch misprediction 5 nanosec
fetch from L2 cache memory 7 nanosec
Mutex lock/unlock 25 nanosec
fetch from main memory 100 nanosec
send 2K bytes over 1Gbps network 20,000 nanosec
read 1MB sequentially from memory 250,000 nanosec
fetch from new disk location (seek) 8,000,000 nanosec
read 1MB sequentially from disk 20,000,000 nanosec
send packet US to Europe and back 150 milliseconds = 150,000,000 nanosec
Run Code Online (Sandbox Code Playgroud)
它表示"执行典型指令"= 1 ns的部分意味着1 GHz CPU(当然假设有效的流水线操作).
我不知道他在哪里获取这些信息,但我相信Peter Norvig是可靠的:-)
归档时间: |
|
查看次数: |
5028 次 |
最近记录: |