News for hackers. Stuff that matters.
Re:The Lost Art of C Structure Packing by smeenai on Saturday November 04, 2017 @03:41PM (#15626545)
clang-tidy has a struct padding check which diagnoses non-optimal struct orders, and a coworker contributed a clang tool to reorder fields: https://github.com/llvm-mirror/clang-tools-extra/tree/master...
Re:The Lost Art of C Structure Packing by nly on Saturday November 04, 2017 @04:00PM (#15626616)
This makes sense if you're only concerned with size. Locality or eliminating false sharing may be more important in large ones