News for hackers. Stuff that matters.
Re:The Lost Art of Structure Packing (2018) by htfy96 on Monday April 27, 2020 @09:59AM (#22995868)
Automatic reordering of fields is great, but sometimes people know more about how they will be used (like frequently accessed groups of fields, or leave some fields in the first 256 bytes so a u8 relative index could be used to save space), so manual reordering still exists for a reason beyond packing.
Re:The Lost Art of Structure Packing (2018) by ChrisSD on Monday April 27, 2020 @12:36PM (#22997401)
I believe adrianN was suggesting that it would be useful if you could opt-in to automatic reordering on a per struct basis. Currently C doesn't give a choice other than to do it manually.