3 ms·
There's one and only one reason we write code the way he says not to: performance. Working with words instead of byte munging makes a huge performance differenc
by TwoBit 15y ago
There's one and only one reason we write code the way he says not to: performance. Working with words instead of byte munging makes a huge performance difference. And in game development performance beats most other reasoning, especially when we are talking about loading tens of thousands of these on startup. And besides, all our code is wrapped in calls to inline functions named uint32_t FromBigEndian(...) anyway, so it's actually cleaner than what he proposes.