多少时间没有考虑到从内存中取一个字? [英] How much time does it take to fetch one word from memory?

查看:365
本文介绍了多少时间没有考虑到从内存中取一个字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Norvig还的意见,我琢磨一个问题:

多少时间没有考虑到从存储器中取出一个字,有和没有高速缓存未命中?

How much time does it take to fetch one word from memory, with and without a cache miss?

(假设标准硬件和架构。为了简化计算,假设1GHz主频)

(Assume standard hardware and architecture. To simplify calculations assume 1Ghz clock)

推荐答案

好像诺维格回答了这个自己

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 

它说:执行典型的指令= 1纳秒意味着1GHz的CPU(假设有效的流水线,当然)的一部分。

The part where it says "execute typical instruction" = 1 ns implies a 1 GHz CPU (assuming efficient pipelining, of course).

我不知道他在那里接受这一信息,但我相信彼得弱势族群是可靠的: - )

I don't know where he takes this information, but I trust Peter Norvig to be reliable :-)

这篇关于多少时间没有考虑到从内存中取一个字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆