[GHC] #14594: 2 modules / 2500LOC takes nearly 3 minutes to build

GHC ghc-devs at haskell.org
Mon Jan 22 15:34:39 UTC 2018


#14594: 2 modules / 2500LOC takes nearly 3 minutes to build
-------------------------------------+-------------------------------------
        Reporter:  schyler           |                Owner:  dfeuer
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:                    |             Keywords:
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 dfeuer):

 I have not as yet been able to find anything non-linear, but we seem to
 pay an awful lot ''per instance''. Given

 {{{#!hs
 data Foo7 = Foo7 (Int) deriving Data
 data Foo8 = Foo8 (Int) deriving Data
 -- plus 25 more like this
 }}}

 compiling with `-O` takes 5 seconds. The single most expensive part is
 codegen, which takes about a second, but otherwise no particular pass
 stands out as being particularly expensive.

 I experimentally tried deriving more of the `Data` methods to try to
 reduce simplification time. Unfortunately, I paid for it in typechecking
 time. I still want to check if ''some'' of those extra methods are
 worthwhile, but otherwise I really don't know.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14594#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list