Skip to content

Commit

Permalink
Enable -fworker-wrapper-cbv on ghc-9.4
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AndreasPK committed May 23, 2024
1 parent c651094 commit 57bddd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion containers-tests/containers-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions containers/containers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 57bddd3

Please sign in to comment.