By: Jan Wassenberg (jan.wassenberg.delete@this.gmail.com), May 23, 2022 4:34 am
Room: Moderated Discussions
Charlie Burnes (charlie.burnes.delete@this.no-spam.com) on May 23, 2022 12:46 am wrote:
> That’s a good point that I didn’t consider. After thinking about it some more, I don’t
> think the U at the end of LoadU and StoreU are warts. To me, they are concise documentation
> that says the programmer knows there will be a performance hit here. Hopefully, the U will be
> rare. If I see a lot of LoadU or StoreU, it could suggest I need to reconsider the data layout.
> An tool would only highlight Load and Store without the U at the end, because those are the
> memory operations where the programmer is expecting the data to be aligned and it isn’t.
OK :) Actually if Store() is executed with unaligned pointers, it will crash (raise an exception), so no need for highlighting.
> That’s a good point that I didn’t consider. After thinking about it some more, I don’t
> think the U at the end of LoadU and StoreU are warts. To me, they are concise documentation
> that says the programmer knows there will be a performance hit here. Hopefully, the U will be
> rare. If I see a lot of LoadU or StoreU, it could suggest I need to reconsider the data layout.
> An tool would only highlight Load and Store without the U at the end, because those are the
> memory operations where the programmer is expecting the data to be aligned and it isn’t.
OK :) Actually if Store() is executed with unaligned pointers, it will crash (raise an exception), so no need for highlighting.