a) Processor speed is only one metric. Celeron vs Pentium - cache memory.
Cache is symmetric to memory, but the speed difference between hard-drive and memory and memory and cache is different. That is why not too many people think about cache. Secondly compiler takes care of cache, whereas disk access is done by programmer.
b) Instruction cache vs data cache
c) How to make code cache memory efficient?
Temporal locality - if you use data now, you will use it soon.
Spatial locality - if you data now, you will possibly do something with data around it.
a) multidimensional arrays - large block of data versus data with hole
http://stackoverflow.com/questions/763262/how-does-one-write-code-that-best-utilizes-the-cpu-cache-to-improve-performance
b) optimization turn on - rely on compiler
c)
http://lwn.net/Articles/250967/
http://arstechnica.com/gadgets/2002/07/caching/
d) write through and write back
e) linked lists are far less efficient from blocks of array data
e) programmers should send unused data directly to RAM.
http://lwn.net/Articles/255364/
#include
#include
#include