duncan.coutts:
> On Tue, 2007-11-27 at 23:07 -0800, Stefan O'Rear wrote: 
> > On Tue, Nov 27, 2007 at 10:23:40PM -0800, Don Stewart wrote:
> > > SO very little fix up of the Stream structures the library translated
> > > the list code into.. probably not good...and running this we find it has
> > > a space leak, and takes 5 times as long:
> > > 
> > >     ./C  27.58s user 1.11s system 99% cpu 28.878 total
> > 
> > SpecConstr should not be able to change asymptotic space behavior one
> > way or the other.  If not doing it introduces a leak, something has gone
> > terribly wrong.
> 
> Perhaps Don can correct me, but I expect there isn't actually a leak,
> it's just that the code is allocating much much more memory in its inner
> loop. Stream fusion relies on SpecConstr for everything other that

That's right. My mail from last night explaining this was held up in the queue.

> simple flat stuff like map, filter, fold (the kind of stuff we had in
> bytestring before SpecConstr was implemented). Stream fusion relies on
> SpecConstr in the sense that without it stream fusion makes the code
> much worse.

Right, and in this case we have zipWith, which I think is the thing
that's not being cleaned up properly, without full SpecConstr.

-- Don

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to