Bytes with 128 bits?

Don Clugston dac at nospam.com.au
Tue Aug 14 09:03:56 PDT 2007


Manfred Nowak wrote:
> Regan Heath wrote
> 
>> Or am I missing the point entirely?
> 
> I post in the learn-group because do not know exactly what the point 
> is.
> 
> At first glance it seems that the current hardware emulates bytes of 
> size 8 bits on main memory with a granularity of 128 bits.
> 
> If this is true then a severe slowdown should happen by exceeding the 
> 128 bit boundary for consecutive accesses of 8 bit bytes---and 
> algorithms as well as the compiler should take this into account.

It would, if there was no cache. In fact, ALL access from RAM is very slow.
The accessing works like this:

RAM -> L2 cache -> L1 cache -> CPU.

The 128 bits only affects the speed at which you load from RAM into L2 cache.
But normally you try to stay in the L1 cache, so it doesn't matter.



More information about the Digitalmars-d-learn mailing list