Cache lines, false sharing and alignment

后端 未结 3 387
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 14:22

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

3条回答
  •  你的背包
    2021-02-05 14:39

    In modern C++ (17 and above) you should use hardware_constructive_interference_size.

提交回复
热议问题