[GHC] #7258: Compiling DynFlags is jolly slow
GHC
ghc-devs at haskell.org
Wed Oct 18 07:16:38 UTC 2017
#7258: Compiling DynFlags is jolly slow
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.1
Resolution: | Keywords: deriving-perf
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tdammers):
Replying to [comment:37 bgamari]:
> While chatting with tdammers about this I had a peek at the core; it
seems that 5000 terms of the 7000 terms in the simplified core of `W2` are
in `creadPrec_rdaO`. Moreover, much of this is repetition. I've proposed
an approach for dealing with this in #14364.
I've just done a bit more profiling, and it turns out that removing the
derived `Read` instance from the `W3` example (`W2` extended to 500
fields) cuts overall compilation time down from 25.5 seconds to 3.6. So it
seems that the edge case isn't just "constructors with many fields", but
rather, "derived `Read` instances for constructors with many fields".
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7258#comment:40>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list