[Haskell-cafe] Re: Laziness leaks
barsoap at web.de
Thu Jun 5 13:14:31 EDT 2008
Paul Johnson <paul at cogito.org.uk> wrote:
> Achim Schneider wrote:
> > There won't ever be a space leak without a time leak nor a time leak
> > without a space leak. I'd just call it a leak.
> Actually I think you can have a space leak without a time leak. For
> instance if every time around the main loop I cons data onto a linked
> list that never gets freed then I have a space leak. If the list
> never gets used (or more realistically, if the program only ever uses
> the first N entries) then there is no time leak.
Sure there is: you leaked time while constructing the list.
The whole topic seems to degenerate into nit-picking for border cases.
One could define a leak as "a property of an error-free program
resulting in non-optimal performance", or much more concise,
"a trap no sufficiently smart programmer runs into".
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
More information about the Haskell-Cafe