3 ms·
It’s interesting the author frames cache optimization as a way to make ‘reasonable use’ of computing resources. But cache locality is only relevant to your cod
by jameshart 5y ago
It’s interesting the author frames cache optimization as a way to make ‘reasonable use’ of computing resources.
But cache locality is only relevant to your code if you have a monopoly on a CPU core. There are likely hundreds of other processes running on a machine apart from yours and to make ‘reasonable’ use of computing resources your program needs to be effective and perform at even if those other processes preempt your code from running.
Making your code really good at using ALL the compute resources on a machine is not the same thing as making your code make reasonable use of computer resources.
- rrss 5y agoIf one process is using only 4 bytes out of every 64 byte cache line fill, the rest of the line is wasted regardless of whether there are hundreds of other processes loading different lines into the various levels of cache. It’s not using more of the cache, just using the same lines (or fewer) more effectively.