by rcp » Nov 11, 2003 @ 1:45am
This topic should be made a "sticky". As a "old-school" ASM programmer, I forget how people look at their data... ie; they look at it from their perspective, not the hardware's. I've tried to explain this to other people at times, but I don't think I ever got the point across. Refractor's answers to DooMer_MP3's example is probably the best example I've ever seen of this. A nice simple case where not using the cache correctly can just absolutely kill your performance, and a simple change can get you a 2x increase. I've reorganized massive data arrays into tiles and seen a 10x improvement. When your CPU speed is 4x faster than your memory... the cache makes a big, big difference.
Cheers,
rcp