GHC/Memory Management

From HaskellWiki
< GHC
Revision as of 20:35, 23 June 2009 by Bulatz (talk | contribs) (Motivation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Haskell computations produces a lot of memory garbage - much more than conventional imperative languages. It's because data are immutable so the only way to store computation result is to create new data. In particular, every iteration of recursive computation creates new data. But GHC is able to efficiently manage garbage collection, so it's not uncommon to produce 1gb of data per second (most part of which will be garbage collected immediately). So, you may be interested to learn how GHC does such good job