Open main menu

CDOT Wiki β

Changes

Team False Sharing

36 bytes added, 20:57, 17 December 2017
Thread Local Variables
}
</source>
[[File:ExecutionSpeedupLocal.png]]
 
Wasting memory to put your data on different cache lines is not ideal solution to the False Sharing problem even though it works. Using local variables, instead of contiguous array locations, the writes to memory will be spread out to different cache lines. Another benefit to this approach is that you do not have multiple threads writing to the same cache line, invalidating the data and bottlenecking the processes.
96
edits