[GHC] #15751: GHC takes huge amounts of memory and compile time when compiling ZipWith from accelerate

GHC ghc-devs at haskell.org
Mon Oct 15 08:16:58 UTC 2018


#15751: GHC takes huge amounts of memory and compile time when compiling ZipWith
from accelerate
-------------------------------------+-------------------------------------
           Reporter:  tdammers       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  performance bug
          Test Case:  Compile        |        Blocked By:
  `Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith`|
  from `accelerate-1.2.0`            |
           Blocking:                 |   Related Tickets:  #15488
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 In #15488, we found that GHC takes huge amounts of memory by building up
 excessively large amounts of Core. Looking a the
 `Data.Array.Accelerate.Analysis.Hash` module there, the problem seems to
 be due to excessive (and unproductive) inlining.

 However, the `Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith` module
 *also* takes a very large amount of time and memory to compile, and while
 it also builds up huge amounts of Core in unproductive ways, the blowup
 happens in a different step.

 https://github.com/AccelerateHS/accelerate/issues/428#issuecomment-425019263
 has a build log that points at the first round of `Specialise` as the
 culprit.

 Just like #15488, this problem seems to trace back to GHC 8.0.2 at least,
 possibly further.

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


More information about the ghc-tickets mailing list