[GHC] #10289: compiling huge HashSet hogs memory

GHC ghc-devs at haskell.org
Fri Apr 24 00:40:17 UTC 2015


#10289: compiling huge HashSet hogs memory
-------------------------------------+-------------------------------------
        Reporter:  zudov             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  Runtime           |  (amd64)
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by zudov):

 > What happens if you don't have the call to `S.fromList`?

 This compiles fine with `-O2`. However if I use `-O0 -fno-ignore-
 interface-pragmas` then memory consumption goes high again.

 That seems a little strange to me. How do you think, is it a right way to
 reproduce the problem without depending on unordered-containers (if it is,
 then we probably can just experiment with list and come back to `HashSet`
 later)?

 I tried to observe the behaviour of a smaller list compilation with
 `-ddump-inlinings`:

 - Compilation with `-O2 -ddump-inlinings` reports inlining of
 `Data.Text.pack` and `GHC.Base.build` on each element
 - Compilation with `-O0 -ddump-inlinings` reports inlining of:
   - `Data.Text.pack`
   - `Data.Text.Internal.Fusion.unstream`
   - `Data.Text.Internal.Fusion.Common.map`
   - `Data.Text.Internal.Fusion.Common.streamList`
   - `Data.Text.Internal.safe`
   - `Data.Text.Internal.Fusion.Types.$WYield`

 Please suggest if it makes sense to dig into that direction.

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


More information about the ghc-tickets mailing list