From 57bddd3c2933220fbba76bfed983809afea14352 Mon Sep 17 00:00:00 2001 From: Andreas Klebinger Date: Thu, 23 May 2024 11:08:45 +0200 Subject: [PATCH] Enable -fworker-wrapper-cbv on ghc-9.4 This flag allows for some significant perf improvements and the downsides don't apply to containers. In particular this flag can cause rules to not fire *if* the relevant functions don't have NOINLINE pragmas. However the relevant functions in containers seem to have such a pragma so there should be no downside. --- containers-tests/containers-tests.cabal | 3 ++- containers/containers.cabal | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/containers-tests/containers-tests.cabal b/containers-tests/containers-tests.cabal index c226d45e0..8b6c160e4 100644 --- a/containers-tests/containers-tests.cabal +++ b/containers-tests/containers-tests.cabal @@ -76,9 +76,10 @@ library hs-source-dirs: src, tests ghc-options: -O2 -Wall + if impl(ghc >= 9.4) + ghc-options: -fworker-wrapper-cbv if impl(ghc >= 8.6) ghc-options: -fproc-alignment=64 - other-extensions: BangPatterns CPP diff --git a/containers/containers.cabal b/containers/containers.cabal index cc76c7a3f..429a47267 100644 --- a/containers/containers.cabal +++ b/containers/containers.cabal @@ -39,6 +39,8 @@ Library build-depends: base >= 4.10 && < 5, array >= 0.4.0.0, deepseq >= 1.2 && < 1.6, template-haskell hs-source-dirs: src ghc-options: -O2 -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates + if impl(ghc >= 9.4) + ghc-options: -fworker-wrapper-cbv other-extensions: CPP, BangPatterns