[GHC] #15703: Significant compilation time blowup when refactoring singletons-heavy code

GHC ghc-devs at haskell.org
Mon Oct 8 18:07:32 UTC 2018


#15703: Significant compilation time blowup when refactoring singletons-heavy code
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.6.1
      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 RyanGlScott):

 I added `{-# OPTIONS_GHC -fprof-auto #-}` to the top of `OptCoercion`,
 which gives me some slightly more fine-grained information:

 {{{
         Mon Oct  8 13:50 2018 Time and Allocation Profiling Report
 (Final)

            ghc-stage2 +RTS -p -RTS -B/u/rgscott/Software/ghc3/inplace/lib
 -O1 -fforce-recomp Lib.hs

         total time  =      282.87 secs   (282872 ticks @ 1000 us, 1
 processor)
         total alloc = 403,927,138,248 bytes  (excludes profiling
 overheads)

 COST CENTRE    MODULE      SRC
 %time %alloc

 matchAxiom     OptCoercion compiler/types/OptCoercion.hs:(903,1)-(916,11)
 47.3   43.4
 substTyWith    TyCoRep     compiler/types/TyCoRep.hs:(2213,23)-(2214,50)
 23.0   22.9
 opt_trans_rule OptCoercion compiler/types/OptCoercion.hs:(512,1)-(681,30)
 18.4   21.5
 etaAppCo_maybe OptCoercion compiler/types/OptCoercion.hs:(985,1)-(996,11)
 6.1    9.2
 opt_co4        OptCoercion compiler/types/OptCoercion.hs:(174,1)-(386,71)
 3.4    2.2
 }}}

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


More information about the ghc-tickets mailing list