emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Elpa: Pinpoint semantics of `seq-subseq' for streams


From: John Mastro
Subject: Re: [PATCH] Elpa: Pinpoint semantics of `seq-subseq' for streams
Date: Thu, 15 Sep 2016 10:01:26 -0700

Clément Pit--Claudel <address@hidden> wrote:
> Let me try to summarize it in a different way. In the stream case, you
> build one cons cell at a time, and every time you build a new cons
> cell the previous one is available for garbage collection. With a good
> GC, there's only a few cells physically present in memory at any time
> (plus the memory it takes to keep the last "n" elements, if you're
> desired output is the n-elements tail of the stream).
>
> In the list case, on the other hand, the full list exists in memory
> before you iterate on it. Sure, after you iterate on it, the list can
> be garbage collected; but before you iterate on it, all the cons cells
> need to exist at the same time.

Ah, it indeed makes sense now - thanks!

        John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]