2 ms·
About the search benchmark, caches alone do not explain 2 orders of magnitude difference. It's also the prefetcher. CPU cores have a special functional block w
by Const-me 4y ago
About the search benchmark, caches alone do not explain 2 orders of magnitude difference. It's also the prefetcher.
CPU cores have a special functional block which observes addresses of cache lines requested from memory, detects sequential access pattern, and when detected pre-loads data into caches (including L1d) in advance. The RAM access pattern of std::vector search benchmark is an awesome use case for that thing.