3 ms·
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/l
by smeenai 9y ago
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/clang-reorder-fields https://github.com/llvm-mirror/clang-tools-extra/tree/master...
- nly 9y agoThis makes sense if you're only concerned with size. Locality or eliminating false sharing may be more important in large ones