[GHC] #9557: Deriving instances is slow

GHC ghc-devs at haskell.org
Sat Sep 6 13:01:22 UTC 2014


#9557: Deriving instances is slow
-------------------------------------+-------------------------------------
       Reporter:  Feuerbach          |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Compiler           |                 Version:  7.8.3
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:
     Blocked By:                     |  None/Unknown
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 Let's take [https://raw.githubusercontent.com/haskell-suite/haskell-src-
 exts/8e0153d33b66add96fd5606614ce7938d2029510/src/Language/Haskell/Exts/Annotated/Syntax.hs
 this file] (from haskell-src-exts) and build it with -O0. On my machine it
 takes 55s.

 If we remove deriving of all classes except Functor (which is the only one
 used by the module itself), the time will drop down to 4s.

 Different classes vary in their compile-time cost, but there's no single
 culprit. Among the costly ones are Generic, Data, Show, Ord.

 haskell-src-exts users are very annoyed by its long compile time, about 10
 minutes, especially because we don't compile with -O0 by default. It would
 be nice to get this fixed.

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


More information about the ghc-tickets mailing list