Hacker News new | ask | show | jobs
by kjaleshire 3708 days ago
Very cool. Herb Sutter gave a talk [1] a couple years ago in which he advocated being mindful of the CPU prefetcher when dealing with large vectors, esp. vectors of pointers. Essentially as long as memory is being accessed in a predictable manner the pre-fetcher can keep the processor fed.

An aside, because instructions are accessed sequentially (branches aside), I would intuit that data misses are much more common than instruction misses. If this is incorrect I'd be interested in an explanation or further reading.

[1] https://channel9.msdn.com/Events/Build/2014/2-661