News for hackers. Stuff that matters.
Re:ISO C is increasingly moronic by phkamp on Wednesday December 21, 2011 @02:26AM (#3376710)
The reason why struct packing would be a win is probably not performance, but code readability and less bugs.

Making be/le/native conversion a job for the programmer is not only error-prone and a waste of time.

The compiler could safely optimize the byte-swizzles away on non-arithmetic operations, whereas most programmers tend to covert everything before they start working on it.

Re:ISO C is increasingly moronic by __david__ on Wednesday December 21, 2011 @04:57AM (#3376968)
Along those lines I wrote a wishful thinking, blue sky blog post a number of years ago: http://porkrind.org/missives/hardware-friendly-c-structures/