"Lambda Dance", Haskell polemic,...

Manuel M. T. Chakravarty chak@cse.unsw.edu.au
Wed, 04 Apr 2001 16:52:42 +1000


"Wojciech Moczydlowski, Jr" <khaliff@astercity.net> wrote,

> On Tue, 3 Apr 2001, Manuel M. T. Chakravarty wrote:
> 
> > "Wojciech Moczydlowski, Jr" <khaliff@astercity.net> wrote,
> > 
> > > IMO, what's also important, is an infamous memory consumption. Everybody
> > > seems to ignore it, but by now I wouldn't use Haskell in a commercial product, 
> > > because of this little inconvenience. For me, it doesn't matter much if a
> > > language is slow - as far as it's not very slow, it's ok. More important for
> > > me is the predictability. I have to know how much memory my program will
> > > eat. And in Haskell, with ghc the only sure answer is:
> > > "Very much". 
> > 
> > After profiling and removing space leaks?  In what kind of
> > applications did you encounter this problem?
> 
> I tried to profile my toy C compiler. The profiles simply didn't
> work - the graph didn't convey any informations. I've informed about the bug
> and let it go.
> And besides, after rough testing, it seemed that memory usage grows linear
> with a compiled program size. It was OK. But during the
> compilation of 200KB program, my compiler ate AFAIR about 30MB of memory. 

How much memory is gcc eating for a 200KB program?  If you
were to a write a toy C compiler in C++ or Java, do you
think, it would eat significantly less memory without
seriously tuning of the memory management?

Manuel