
#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 simonpj): What happens if you don't have the call to `S.fromList`? So your file looks like {{{ data :: [Text] data = [ pack "foo", pack "bar", ...etc... ] }}} Another thing to try is to cut it down a lot, use `-dshow-passes` and compare `HashSet` with `HashMap`. With luck you'll see that the latter is much larger on small examples too. Then you can use `ddump-simpl` to see what the expanded code looks like. Using `-ddump-inlinings` shows you what is being inlined. The fact that `HashSet` and `HashMap` differ here makes me think that this is to do with over-zealous inlining or rule-rewriting in `HashSet`. (`-ddump-rule-firings` to see which rewrite rules are firing.) Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10289#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler