Hacker News new | ask | show | jobs
by smeenai 3146 days 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...
1 comments

This makes sense if you're only concerned with size. Locality or eliminating false sharing may be more important in large ones