Smarter CPU Testing - How to Benchmark Kaby Lake & Haswell Memory Latency
Modern CPUs are complex beasts with billions of transistors. This complexity in hardware brings indeterminacy even in simple software algorithms. Let’s benchmark a simple list traversal. Does the average node access latency correspond to say, a CPU cache latency? Let’s test it! Here we benchmark access latency for lists with a different number of nodes. All the lists are contiguous in memory, traversed sequentially, and have a 4 KB padding between the next pointers.