[GHC] #7068: Extensive Memory usage (regression)

GHC cvs-ghc at haskell.org
Wed Jul 18 18:40:12 CEST 2012


#7068: Extensive Memory usage (regression)
---------------------------------+------------------------------------------
    Reporter:  waldheinz         |       Owner:                              
        Type:  bug               |      Status:  new                         
    Priority:  high              |   Milestone:  7.6.1                       
   Component:  Compiler          |     Version:  7.4.1                       
    Keywords:                    |          Os:  Unknown/Multiple            
Architecture:  Unknown/Multiple  |     Failure:  Compile-time performance bug
  Difficulty:  Unknown           |    Testcase:                              
   Blockedby:                    |    Blocking:                              
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by pcapriotti):

  * owner:  pcapriotti =>


Comment:

 The compiler is blowing up on the SpecConstr pass here. Here is how to
 reproduce the problem without installing any packages:

 {{{
 cabal unpack Vec
 }}}

 add a new binding to `Data/Vec/LinAlg.hs`:

 {{{
 inv :: [[Float]] -> Maybe [[Float]]
 inv l = fmap matToLists (invert (matFromLists l) :: Maybe (Mat44 Float))
 }}}

 export it, and compile with:

 {{{
 ghc -fforce-recomp --make -O1 Data/Vec/LinAlg.hs -fspec-constr
 }}}

 The problem seems to be some sort of exponential blowup during
 specialization
 of the `:.` constructor. Note that all the functions in that module (and
 in
 `Data.Vec.Base`) are inlined.

 Attaching a time and a heap profile with `-fprof-auto` on `SpecConstr.lhs`
 (the compiler was interrupted after a while).

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



More information about the Glasgow-haskell-bugs mailing list