space leak due to optimisations and/or newtypes

Sebastian Fischer sebf at informatik.uni-kiel.de
Thu Jun 4 04:16:52 EDT 2009


On Jun 4, 2009, at 10:05 AM, Simon Peyton-Jones wrote:

> What would really help is a self-contained program that demonstrates  
> the problem.  Maybe that's what you've supplied.  I'm confused  
> though.  You say
>        If I remove any of them (one is enough) then
>        the program finishes in about 10 seconds
>        and runs in constant space (< 3 MB) with optimisations.
>
> Are you also saying this?
>        If I leave all of them in, then the program takes ages and uses
>        lots of space, if I use -O.   But it's fine without -O.

Yes exactly, that is what happens with the program I attached.

Morover, my original program uses lots of memory with and without -O  
(but it's fine without newtypes).

I'll file a Trac bug report and supply both the condensed and the  
original program.

Cheers,
Sebastian

-- 
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)





More information about the Glasgow-haskell-users mailing list