On Mon, 14 May 2012 20:30:15 +0200 Davidlohr Bueso <[email protected]> wrote:
> However, by replacing short integers with a character we already cut the > size of the structure in half (2 vs 1 bytes) and it is a good enough > optimization. I tend to avoid using bitfields as it fits data into words > and this is bad when dealing with endianness. There's really no gain > here anyway, so I'd just label it as a char. Hi Why should we care about endianness here, when the struct is never written to disk nor sent anywhere? A bitfield would cause trouble were the struct concurrently accessed, but as it's only handled from one thread, I see no downside to using bits there. - Lauri _______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
