
#8255: GC Less Operation -------------------------------------+------------------------------------- Reporter: sirinath | Owner: Type: feature request | Status: closed Priority: lowest | Milestone: _|_ Component: Compiler | Version: 7.7 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Runtime | Difficulty: Project (more performance bug | than a week) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by thoughtpolice): I'm not entirely sure what you're proposing. First, GHC's runtime stack is quite different from a traditional C stack - it also must be managed completely by the runtime system. The is no such thing like a difference between 'stack allocation' and 'heap allocation' at the language level like in another language - the stack is used to store continuations when evaluating to WHNF. Objects are always allocated on the heap - even stacks are (since they must grow and be chained.) Just removing stacks through aggressive optimization or some analysis would not remove the need for a GC.
Also allocation / de allocation can be in bocks in Haskell opposed to object at a time based on memory allocation in execution locality.
Based on this, I assume you mean something more like region inference, where the compiler attempts to infer memory regions which may be 'stacked' or nested in each other, and are allocated in bulk, more like a traditional call stack in an imperative language? These schemes are still quite theoretical; Tofte and Talpin introduced this in Standard ML, and to my knowledge there's still some work here on Region/GC integration. The JHC (and AJHC) Haskell compilers also employ a form of region inference, although I am not sure if the author, John Meacham, ever got it truly working - he too eventually included a garbage collector -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8255#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler