News for hackers. Stuff that matters.
Re:Real cost of C++ exception vs error-code checking by svlla on Tuesday March 08, 2011 @01:21PM (#2301944)
Cache sizes have not seen gains proportional to RAM or HDs.
Re:Real cost of C++ exception vs error-code checking by T-hawk on Tuesday March 08, 2011 @01:32PM (#2302004)
Sure they have.

My 486 built in 1993 had 8 KB cache, 4 MB RAM, and a 120 MB HD.

My desktop built in 2009 has 2 MB cache, 2 GB RAM, and a 250 GB HD.

Okay, the cache has lagged behind by one or three doublings compared to the other storage types. But that's still pretty close to proportional in a world of exponential gains.

Re:Real cost of C++ exception vs error-code checking by silentbicycle on Tuesday March 08, 2011 @02:02PM (#2302118)
Memory speeds have increased much more slowly than processors have, so the cost of page faults, bad locality, etc. have grown proportionally worse over time.

http://seven-degrees-of-freedom.blogspot.com/2009/10/latency...

Re:Real cost of C++ exception vs error-code checking by ramchip on Tuesday March 08, 2011 @04:30PM (#2302670)
You're comparing L1 cache with L2 cache. Even a modern CPU like the Core 2 Duo only has about 32 KB of L1 cache per core.
Re:Real cost of C++ exception vs error-code checking by anamax on Tuesday March 08, 2011 @04:14PM (#2302608)
> My 486 built in 1993 had 8 KB cache, > My desktop built in 2009 has 2 MB cache

That "2 MB" is either L2 or L3, which your 486 didn't have.

The L1 on your desktop is not much larger than the only cache that your 486 had.

As frequency increases, the length of the path that a signal can travel in one clock decreases. Fortunately, cycle-time increases have been accompanied by transistor size decreases, so the net result is that L1 sizes have been roughly constant.

Re:Real cost of C++ exception vs error-code checking by faragon on Tuesday March 08, 2011 @03:44PM (#2302520)
I bet that your 1993 486 had 256KB of L2 cache on the motherboard, so from 256KB to 2MB is less than 10 times, for 500 times the RAM and 2000 times the hard disk size.
Re:Real cost of C++ exception vs error-code checking by Retric on Tuesday March 08, 2011 @10:10PM (#2303621)
The value of Cache does not increase linearly with size. You also run into latency issues, so Having L4 cache on a modern motherboard would have little value.
Re:Real cost of C++ exception vs error-code checking by faragon on Wednesday March 09, 2011 @02:25AM (#2304203)
The value of cache memory is the "hit ratio". If increasing cache size by 50% increases cache-hit from 95% to 99%, is worth it, as the 5% of cache-misses could reduce CPU performance to one half.
Re:Real cost of C++ exception vs error-code checking by svlla on Tuesday March 08, 2011 @01:40PM (#2302032)
Good point :)

Here's a different take, then, and probably harder to verify, but I am guessing is true:

Cache utilization has increased much more than RAM or HD, not just because programs are handling more data but also because of increases in program size and number of programs being run simultaneously.

Your hard drive is probably not full... RAM could be, depends on your workload... but I bet most caches are churning like mad, more than they used to be.