3 ms·
That particular optimization is unlikely but there have been C compilers that optimized struct layout. 179.art, one of the SPEC2000 benchmarks, has some poorly
by tjalfi 6y ago
That particular optimization is unlikely but there have been C compilers that optimized struct layout.
179.art, one of the SPEC2000 benchmarks, has some poorly laid out structs. Sun introduced targeted optimizations for this benchmark and several other vendors also did so. I have also read papers about profile-guided struct reordering but don't have a citation on hand.
GCC also had a pass[0] for this optimization but it may have been removed.
[0] https://www.research.ibm.com/haifa/dept/_svt/papers/golovanevsky.pdf https://www.research.ibm.com/haifa/dept/_svt/papers/golovane...