[GHC] #12790: GHC 8.0.1 uses copious amounts of RAM and time when trying to compile lambdabot-haskell-plugins
GHC
ghc-devs at haskell.org
Thu Feb 15 14:47:18 UTC 2018
#12790: GHC 8.0.1 uses copious amounts of RAM and time when trying to compile
lambdabot-haskell-plugins
-------------------------------------+-------------------------------------
Reporter: clint | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.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):
Great catch. Indeed, I cannot reproduce the issue anymore with GHC 8.2.2,
GHC 8.4.1, or HEAD with the program in comment:7, and moreover, I can
compile `lambdabot-haskell-plugins` on GHC 8.2.2 in a reasonable amount of
time with profiling enabled.
Here's what you get for the Core for `list` on GHC HEAD:
{{{
-- RHS size: {terms: 1, types: 0, coercions: 7, joins: 0/0}
list :: Parser Expr
list
= Parser.list1
`cast` (Sym (Text.Parsec.Prim.N:ParsecT[0]
<[Char]>_R <()>_R <Data.Functor.Identity.Identity>_R
<Expr>_R)
:: (forall b.
Text.Parsec.Prim.State [Char] ()
-> (Expr
-> Text.Parsec.Prim.State [Char] ()
-> Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> (Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> (Expr
-> Text.Parsec.Prim.State [Char] ()
-> Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> (Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> Data.Functor.Identity.Identity b :: *)
~R# (Text.Parsec.Prim.ParsecT
[Char] () Data.Functor.Identity.Identity Expr :: *))
-- RHS size: {terms: 8, types: 32, coercions: 0, joins: 0/0}
Parser.list1
:: forall b.
Text.Parsec.Prim.State [Char] ()
-> (Expr
-> Text.Parsec.Prim.State [Char] ()
-> Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> (Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> (Expr
-> Text.Parsec.Prim.State [Char] ()
-> Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> (Text.Parsec.Error.ParseError
-> Data.Functor.Identity.Identity b)
-> Data.Functor.Identity.Identity b
Parser.list1
= \ (@ b_X3Bv)
_ [Occ=Dead]
_ [Occ=Dead]
_ [Occ=Dead]
_ [Occ=Dead]
_ [Occ=Dead] ->
case Parser.list2 of wild_00 { }
}}}
Hooray!
I'll add this as a test case, since GHC HEAD includes `parsec` as a boot
library nowadays.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12790#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list