I wonder if it’s worth the effort to add functionality to take advantage of this in GCC, clang for just these CPUs?
(This article is grist to the mill of my "every CPU eventually evolves to become an interpreter for its dominant programming language" thesis.)
[] It always struck me as one of those propeller-head features that GCC & co. love but which the MS and Intel compilers avoid 'just to be on the safe side' :]
But most people don't enable these features when building because they often make the resulting executable/library unusable on general CPUs. However, businesses/individuals with more specialized needs and better control over their targets often do capitalize on these.
-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/performan...