architecture - 从内存中提取一个单词需要多长时间?

标签 architecture hardware computer-architecture

服用 Peter Norvig's advice ,我在思考这个问题:

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



(假设标准硬件和架构。为了简化计算,假设 1Ghz 时钟)

最佳答案

好像是 Norvig answers this himself :

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 ns 的部分意味着 1 GHz CPU(当然,假设有效的流水线)。

我不知道他从哪里获取这些信息,但我相信 Peter Norvig 是可靠的 :-)

关于architecture - 从内存中提取一个单词需要多长时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3142779/

相关文章:

architecture - 如何规划我的软件以避免过度重写和相互依赖

ruby-on-rails - 为什么.Net MVC架构与Rails相比如此复杂?

performance - 为什么未对齐的地址访问会导致 2 次或更多次访问?

c - 在并行化矩阵乘法时,虚拟内核是否对性能有所贡献?

parallel-processing - 一次只能有一个 CPU 访问 RAM 吗?

sql - 面向列的数据库与面向行的数据库

c# - mvvm light Messenger.Default.Register 查看代码隐藏?

assembly - 在哪里可以了解我的计算机的低级工作原理?

java - 使用Java进行灯光控制

c# - 硬件锁定许可 : which hardware pieces should i use?