4 ms·
TLDR: When defining a struct, put the biggest items first. This works well in almost all cases. If you need to squeeze out all padding, use compiler directives
by joosters 7y ago
TLDR: When defining a struct, put the biggest items first. This works well in almost all cases.
If you need to squeeze out all padding, use compiler directives like '#pragma pack', but be aware of the performance implications.