V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Livid
V2EX  ›  程序员

每个计算机工程师都应该知道的一组数字

  •  
  •   Livid · 2011-04-04 08:51:59 +08:00 · 5923 次点击
    这是一个创建于 4761 天前的主题,其中的信息可能已经有所发展或是发生改变。
    According to http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf

    • 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: 10,000 ns
    • Send 2K bytes over 1 Gbps network: 20,000 ns
    • Read 1 MB sequentially from memory: 250,000 ns
    • Round trip within same datacenter: 500,000 ns
    • Disk seek: 10,000,000 ns
    • Read 1 MB sequentially from network: 10,000,000 ns
    • Read 1 MB sequentially from disk: 30,000,000 ns
    • Send packet CA->Netherlands->CA: 150,000,000 ns
    7 条回复    1970-01-01 08:00:00 +08:00
    willwen
        1
    willwen  
       2011-04-04 09:58:54 +08:00
    这可以用超频调。。取决于性能。。
    Oliver
        2
    Oliver  
       2011-04-04 10:59:11 +08:00
    L1 Cache 的速度好快啊。寄存器的速度是否会更快,或者和 L1 Cache 持平?
    stranbird
        3
    stranbird  
       2011-04-04 11:22:15 +08:00
    寄存是硬件实现 显然很快啊。 L1就是用寄存器们来实现的。
    dogFish
        4
    dogFish  
       2011-04-04 11:43:32 +08:00
    @stranbird L1,L2,寄存器都是CPU内建存储, 没有谁实现谁一说吧
    dogFish
        5
    dogFish  
       2011-04-04 11:48:18 +08:00
    @Oliver 至少持平吧, 我猜的:p
    对于程序员,寄存器速度没有直接意义吧, 能减少缓存命中次数是最接近cpu的优化了吧
    dogFish
        6
    dogFish  
       2011-04-04 11:49:13 +08:00
    错了, 是减少命中失败次数
    Oliver
        7
    Oliver  
       2011-04-04 11:53:23 +08:00
    @dogFish 谢谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2638 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 15:57 · PVG 23:57 · LAX 08:57 · JFK 11:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.