Re:Four limitations of Rust's borrow checker
by IX-103 on Tuesday December 24, 2024 @03:05PM
(#42504535)
The main benefit from contiguous storage is it can be a better match to the cache. Modern CPUs read an entire cache line in a burst. So if you're iterating through a contiguous array of items then chances are the data is already in the cache. Also the processor tends to prefetch cache lines when it recognizes a linear access pattern, so it can be fetching the next element in the array while it's working on the one before it.
[ Parent
| on HN ]
There are no comments on this comment yet.