I wrote the following short C++ program to reproduce the false sharing effect as described by Herb Sutter:
Say, we want to perform a total amount of WORKLOAD integer op
In modern C++ (17 and above) you should use hardware_constructive_interference_size.