It bothered me a bit that I couldn't find a mathematical analysis of the "minimizing structure size by reordering member fields while respecting alignment" problem, so I decided to play around with a simple version of the problem myself. Not sure how useful this is in practice, but I was able to answer part of my curiosity at least.
sivakusayan•1h ago
Would be happy to answer any questions!