How it fetches your bitfield whether on a byte boundary or not depends on the efficiency of your compiler. Placing an 8 bit bitfield on a byte boundary does not guarantee it will be accessed that way. Also, which bit in a bitfield is bit 0 is up to the compiler. Most will allow you to set it. This is not related to the endian of the CPU. And if you ever move your app from the Intel family, those semi-free accesses to unaligned data are going away.camsr wrote:If I were to instead declare a bitfield on byte boundaries, would this be faster? Assuming the processing of the values are the same, just having the CPU address a contiguous byte results in less overhead?
In x64 mode, you shouldn't be that tight on memory. I'd burn memory for speed and take the fixed point conversion out of bitfields.
Cheers
