3 ms·
Apparently some sizes are cursed! It would be great to repeat the author’s tests on other CPU models
by jasonthorsness 1y ago
Apparently some sizes are cursed!
It would be great to repeat the author’s tests on other CPU models
- TuxSH 1y agoI wonder what the page size is on his system (and what effective alignment his pointers have). If it's 4K, the sizes look really close to 0x1000 and 0x2000 - maybe crossing page boundaries?
- astrange 1y agoIt's because of cache addressing conflicts. If two addresses have the same cache key your cache suddenly doesn't work anymore. And many CPUs just use the low bits instead of hashing it.
- Veserv 1y agoL1 caches are usually N-way associative, so that should only become a consistent problem if you access N distinct addresses with the same key (in this case the same offset (with likely 64-byte granularity) relative to a 4K boundary).