4 ms·
-march=arch -mtune=arch has existed for decades, and the performance improvement is measurable. But mainstream distributions often cannot take advantage, since
by segfaultbuserr 6y ago
-march=arch -mtune=arch
has existed for decades, and the performance improvement is measurable. But mainstream distributions often cannot take advantage, since they need to support all CPUs, and optimization for one is often a deoptimization for another. It's also a reason why Gentoo exists.
Interestingly, Intel's Clear Linux - a optimization-oriented distribution - uses
-march=westmere -mtune=haswell
https://docs.01.org/clearlinux/latest/guides/clear/performance.html https://docs.01.org/clearlinux/latest/guides/clear/performan...
- marmaduke 6y agoWestmere is pretty old but significantly is the first generation to support virtual machines with little overhead. If clear Linux allowed something newer then it would rule itself out for a lot of existing machines (such as the 20+ I have running HPC jobs with surprising reliability)
- segfaultbuserr 6y agoYeah, it's a reasonable tradeoff - be compatible with 1st Gen (basically all post-2010 modern x86_64 Intel processors), but try fine-tuning it a little bit for Haswell.