c++false-sharing

What is true sharing?


While reading this question I encountered the terms “false sharing” and “true sharing”. I read what false sharing is, but I can’t find anything on true sharing. Although in the mentioned question the term is described as “constructive interference” I still don’t understand what it means.


Solution

  • True sharing is one core accessing multiple nearby memory addresses that have been loaded into a single cache line. Every access after the first benefits from the cache.