It Scaled On My Laptop
You are reviewing a change that fixes false sharing in a hot counter array. The author writes:
I benchmarked the original code on my quad-core desktop with 1, 2, 3 and 4 threads. The time barely moved. False sharing is a textbook problem that modern CPUs handle; I am removing the padding to shrink the struct.
The same microbenchmark on a four-socket machine is 11 times slower at 4 threads than at 1. Both measurements are real. What should you conclude?
Sign in to answer questions and track your progress
Sign In