diff --git a/CHANGES.md b/CHANGES.md index 28e194af..d514c638 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +## [0.2.19.2] – September 2023 + + * [By default pass `-msse4.2` on x86 architectures](https://github.com/haskell-unordered-containers/unordered-containers/pull/483) + +[0.2.19.2]: https://github.com/haskell-unordered-containers/unordered-containers/compare/v0.2.19.1...v0.2.19.2 + ## [0.2.19.1] – April 2022 * [Fix bug in `intersection[With[Key]]`](https://github.com/haskell-unordered-containers/unordered-containers/pull/427) diff --git a/unordered-containers.cabal b/unordered-containers.cabal index d16adc73..9ab1c75d 100644 --- a/unordered-containers.cabal +++ b/unordered-containers.cabal @@ -42,6 +42,14 @@ flag debug description: Enable debug support default: False +flag sse42 + description: Instruct GHC to use -msse4.2. Disable this to allow + older architectures to use unordered-containers. Only relevant + for x86; expect performance regressions on newer architectures + when disabled. + default: True + manual: True + library exposed-modules: Data.HashMap.Internal @@ -70,6 +78,9 @@ library BangPatterns ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans + if flag(sse42) && arch(x86_64) + -- only enable flag on x86 + ghc-options: -msse4.2 -- For dumping the generated code: -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file