[GHC] #9669: Long compile time/high memory usage for modules with many deriving clauses
GHC
ghc-devs at haskell.org
Mon Oct 6 12:47:37 UTC 2014
#9669: Long compile time/high memory usage for modules with many deriving clauses
-------------------------------------+-------------------------------------
Reporter: snoyberg | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: Compile- | Difficulty: Unknown
time performance bug | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by snoyberg):
I've attached a file (generate.hs) to hopefully give a simpler view of the
problem. This module (which depends only on base) will generate a Haskell
source file which itself depends only on base. You can test this out with
`runghc generate.hs > Bar.hs && time ghc --make Bar.hs +RTS -s`. You can
also edit the generate.hs file to change which classes are derived and how
many datatypes are generated.
In my testing, without switching optimization flags, I noticed the
following (all results generated when using 200 types):
* All classes: 247MB max residency, 17.7s runtime
* Removing `Generic`: 109MB, 13.4s
* Removing `Generic` and `Data`: 78MB, 9.4s
* Removing all but `Typeable`: 23MB, 1.1s
* Removing all deriving: 13MB, 0.6s
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9669#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list