Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: what space leak could happen here? (Brandon Allbery)
----------------------------------------------------------------------
Message: 1
Date: Mon, 22 Sep 2014 00:19:19 -0400
From: Brandon Allbery <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] what space leak could happen here?
Message-ID:
<cakfcl4w9dvojmanr7g2cahv1ijxci4xos8thmoz+rjvennt...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Mon, Sep 22, 2014 at 12:10 AM, Phil Xiaojun Hu <[email protected]> wrote:
> Think of a network socket as the source of your list, and the first
> character is all you need. If you need to evaluate the second character
> to get the first, you could be stuck on the network socket for some
> time waiting for the second one to come.
>
That's more of a time leak. I think the space leak aspect comes from the
fact that you've evaluated a second list element that was not requested,
may never be used, and will be held in the heap until all shared consumers
of the list go out of scope. (It may of course also be a time leak if
computing that second element is expensive.)
--
brandon s allbery kf8nh sine nomine associates
[email protected] [email protected]
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140922/ac44bccc/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 75, Issue 18
*****************************************