Cache Line Padding: The Direct Fix

Adding unused bytes, or 'padding,' between variables is a primary strategy to ensure that distinct data items, frequently accessed by different threads, reside on separate cache lines. This prevents unnecessary cache invalidations and migrations; for example, padding to a typical 64-byte cache line boundary is common.

Sources

Open the full topic