3 ms·
Agreed, I've always found them unusual and perhaps a bit of a shortsighted decision --- they've been making processors seamlessly handle any alignment with perh
by userbinator 10y ago
Agreed, I've always found them unusual and perhaps a bit of a shortsighted decision --- they've been making processors seamlessly handle any alignment with perhaps an extra cycle, even for the MMX instructions, yet somehow felt the need to restrict much of the SSE ones into aligned and only provide one unaligned move.
The stack alignment restriction is also annoying when handwriting Asm, although fortunately it's only when calling into other C libraries that it needs to be minded.
- jjoonathan 10y ago> seamlessly handle any alignment with perhaps an extra cycle I'm not up to date on the latest mitigation strategies, but the hairball of cache implications caused by unaligned access make me suspicious of that claim. If you (or your compiler) signal that you want performance by using vector instructions, I think it's completely fair for Intel to demand that you pay attention to alignment.
- qb45 10y agoCase in point: a simple example of code which copies 1MB of data with SSE and slows down on misalignment: https://news.ycombinator.com/item?id=12718625 https://news.ycombinator.com/item?id=12718625 Presumably due to the hairball of cache implications, as you put it. But it also is true that the choice of aligned/unaligned instructions makes no difference if the array is aligned.
- pcwalton 10y ago> yet somehow felt the need to restrict much of the SSE ones into aligned Because it wasn't worth spending die space on that as opposed to other things that matter a lot more for performance, presumably.