
* Glenn Enright <elinar(a)ihug.co.nz> [2006-05-17 00:55]:
On Wednesday 17 May 2006 1:45 am, Oliver Jones wrote:
Eg, a PlayStation 2 cache miss costs you 50 cpu cycles. Lesson, don't scatter your data all over RAM. :)
Holy cow!
Yeah, memory has not kept up with CPUs in terms of clock speed. Before the 386, there were no caches in PC-compatibles. With the 386, on-chipset caches were first introduced by some manufacturers, and they made a noticable difference. The 486 was the first CPU with an on-chip cache; so the first chipsets didn’t have a cache of their own. When L2 cache were introduced, their contribution to performance was controversial. With the Pentium, however, there was no question that the gap between L1 cache speed and main memory had gotten so large than an L2 cache was an undeniable boost. I don’t know how much fact this was based on, but there has always been a claim that the fastest Pentium 1 ran barely any faster than a 286 if you disabled all caches. Considering how much caches have grown in speed and size though, it is quite believable that most of the computation speed of modern chips is mainly due to cache performance. Some points of reference: the 386 caches were on the order of 32KB; the 486’s L1 cache was just 4KB but clocked at full CPU speed; the first L2 caches were on the order of 128KB and mainly got their advantage from bandwidth, not clock speed, if memory serves; nowadays L1 caches are on the order of 128KB and L2 caches are megabytes in size, with L1 cache running at full clockspeed. So yeah, locality is incredibly important. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>