algorithmica icon indicating copy to clipboard operation
algorithmica copied to clipboard

question about 'divisible by some large powers of two' in 'Cache Associativity' section

Open sci-42ver opened this issue 2 years ago • 0 comments

in 'Cache Associativity', the author says:

When the array size is a multiple of a large power of two, then the indices of the “hottest” elements, the ones we likely request on the first dozen or so iterations, will also be divisible by some large powers of two and map to the same cache line — kicking each other out and causing a ~20% performance decrease.

I think only index subbits are related whether memory should be stored to the same set, while this doesn't imply one divisibility relation

sci-42ver avatar Jun 03 '23 07:06 sci-42ver