[GHC] #11380: Compiling a 10.000 line file exhausts memory

GHC ghc-devs at haskell.org
Sun Jan 17 18:16:27 UTC 2016


#11380: Compiling a 10.000 line file exhausts memory
-------------------------------------+-------------------------------------
        Reporter:  kennethb          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by thomie):

 `happy` has a `-a` flag:

 {{{
  -a        --array            generate an array-based parser
 }}}

 Cabal calls `happy -agc` by default, but I was using just `happy` in
 comment:4.
 It seems to influence the results when trying to compile `Parser.hs`
 within 3GB RAM.


 || ghc-7.10.3 Parser.hs ||= happy =||= happy -a =||
 || -O0 || not ok || ok ||
 || -O1 || ok || ok ||

 @jstolek: compiling the non-array based parser //without// optimizations
 fails. Very strange.

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


More information about the ghc-tickets mailing list