False Sharing
Explore false sharing in modern C++ concurrency, understanding how shared cache lines cause performance hits when multiple threads access nearby variables. Learn to apply std::hardware_destructive_interference_size and std::hardware_constructive_interference_size from C++17 to improve your program's efficiency by managing cache line usage optimally.
We'll cover the following...
We'll cover the following...
When a processor reads a variable such as an int from main memory, it will read more than the size of an int from memory; the processor will read an entire cache line (typically 64 bytes) from memory. False sharing occurs ...