4 ms·
> data [needn't] be continuous to stay in cache. Cache is more like paged virtual memory, it consists of cache lines. It sounds like you're saying everything w
by jzwinck 9y ago
> data [needn't] be continuous to stay in cache. Cache is more like paged virtual memory, it consists of cache lines.
It sounds like you're saying everything will be OK so long as each chunk of 64 bytes (cache line) is used together. But one page is typically 4 KB, and if you use for example all 64 bytes of one cache line, but only one cache line per page, you will suffer from TLB misses.
- avodonosov 9y agoIf you throw your computer out of window it may break. Why whould I access only 64 bytes per page? I suggest you to delete this comment. We are not discussing VM here, I brought it as an analogy just to say cache lines are independent and need not be contineous.