Turn on `-msse4.2` by default on hosts which support it.
The motivation for this is that ordinary user probably doesn't know that they will benefit from enabling this flag (and e.g. leave popCount
, countLeadingZeros
instructions unused), e.g. cabal install my-new-program
is slower.
... and same can be argued for other instruction sets (which have been around for some quite time).
We probably need explicit -mno-sse4.2
etc flags to disable instruction sets, maybe some "disable all instruction sets" flag as well. This will be needed when compiling some to be distributed binaries.
Alternatively the packages will be polluted with explicit flags, like in https://github.com/haskell-unordered-containers/unordered-containers/pull/483