4 ms·
I have some experience using/modifying linked-list benchmarks (https://github.com/google/multichase https://github.com/google/multichase) specifically to test m
by tylerhou 4y ago
I have some experience using/modifying linked-list benchmarks (https://github.com/google/multichase https://github.com/google/multichase) specifically to test memory latency.
It is extremely difficult, maybe impossible, to design a prefetcher that can predict the next cacheline(s) to prefetch while traversing in a linked-list. I am not aware of a single CPU that can do this consistently. For instance, if you run multichase (a linked-list chaser) on GCP servers, you generally get the expected memory latency (~70-100ns, depending on the platform).
- AstralStorm 4y agoWhy let the CPU guess when you can tell it what you want? (Prefetch a small arena of objects linked to by the list.)