When should we align our data and when will the compiler do it for us?

Data (and instruction) alignment is still quite critical for high performance computing, according to Intel's Optimization Guidelines.

I know that we have to align the data ourselves to avoid false swaps (two threads accessing two variables within the same cache line), because the compiler cannot know our threading model.

However, GCC does any other alignments / what alignments don't / what alignments should we do for performance?

+3


source to share





All Articles