Changes

Jump to: navigation, search

GPU621/Analyzing False Sharing

27 bytes added, 10:07, 26 November 2022
no edit summary
= '''Solutions Of False Sharing''' =
== Using local variable ==
#include <thread>
#include <vector>
So the problem of false sharing sometimes cannot be generalized, and the occurrence of false sharing does not necessarily make performance lower. But no matter how the new block is the optimal solution.
== Padding Byte alignment ==
If you think the above example is too limiting, not all cases can be abstracted to such a local variable. So let's let the two variables exist on different cache lines!
118
edits

Navigation menu