POV-Ray : Newsgroups : povray.off-topic : Processor speed Server Time
10 Oct 2024 01:40:28 EDT (-0400)
  Processor speed (Message 21 to 23 of 23)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Orchid XP v8
Subject: Re: Processor speed
Date: 31 Oct 2008 14:21:34
Message: <490b4cae$1@news.povray.org>
>> How wide is a typical cache line?
> 
> 
> Warp said 32 bytes. I thought that was way smaller than I remembered, 
> but I went and variously tracked it down, and indeed, most of the modern 
> machines seem to have 32-byte cache lines.  I think they used to be 
> wider, like 128 bytes, but maybe I'm misremembering, or thinking of 
> mainframes, or something.

Right. So just to make sure I understand this... you're saying the cache 
is managed in chunks of 32 bytes at a time? Like, if you fetch 1 byte of 
data from memory, 32 bytes will be loaded into the least recently used 
cache line? (Or whatever the cache policy is.)

Are the cache lines aligned in any sort of way? (I'm wondering if it 
grabs 32 bytes at the nearest 32-byte boundary or not.)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Darren New
Subject: Re: Processor speed
Date: 31 Oct 2008 15:59:14
Message: <490b6392$1@news.povray.org>
Orchid XP v8 wrote:
> Right. So just to make sure I understand this... you're saying the cache 
> is managed in chunks of 32 bytes at a time? Like, if you fetch 1 byte of 
> data from memory, 32 bytes will be loaded into the least recently used 
> cache line? (Or whatever the cache policy is.)

That's how I understand it. I believe it's more accurate to say that the 
bus between the memory and the registers is actually 32-bytes wide. I 
may be mistaken in that, tho.

> Are the cache lines aligned in any sort of way? (I'm wondering if it 
> grabs 32 bytes at the nearest 32-byte boundary or not.)

I'm also pretty certain it is on 32-byte boundaries. Otherwise, the 
addressing logic winds up being slower than the time you save caching stuff.

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

From: Warp
Subject: Re: Processor speed
Date: 31 Oct 2008 17:55:04
Message: <490b7eb8@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Right. So just to make sure I understand this... you're saying the cache 
> is managed in chunks of 32 bytes at a time? Like, if you fetch 1 byte of 
> data from memory, 32 bytes will be loaded into the least recently used 
> cache line? (Or whatever the cache policy is.)

> Are the cache lines aligned in any sort of way? (I'm wondering if it 
> grabs 32 bytes at the nearest 32-byte boundary or not.)

  You should read this article series if you want to know everything there
is to know about memory and cache:

http://lwn.net/Articles/250967/

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.