On Fri, Jan 8, 2010 at 6:29 AM, Alan Altmark <alan_altm...@us.ibm.com> wrote:

> The warning about alignment-dependent performance has been in the book
> since time immemorial and the assembler has been issuing warnings about it
> since Day 2.  (I remember my great-grandfather mentioning it to his pet
> dinosaur one day....)  Read the section in Chapter 5 on "Storage-Operand
> Consistency" for some additional details.

It may take the impact of a big comet to make old rites and rituals go away.

While modern* machines really don't care about unaligned access
anymore, simply leaving gaps in your data to enforce favorable
alignment "just in case" could make you spill to the next cache line
and achieve quite the opposite of what you wanted to do. One can only
hope that those who poke around in such areas realize they're on their
own and there's no compiler to help them.

Rob

* My apologies to the Linux folks who get upset when I use the word
"modern" for features around since 1980 :-)

Reply via email to