2010/8/10 Nicolas Oury <nicolas.o...@gmail.com>

> On Tue, Aug 10, 2010 at 10:08 AM, Laurent PETIT <laurent.pe...@gmail.com>
> wrote:
> > Naive question from someone who has not really used Scheme in practice :
> > beyond the memory footprint problem (which may or may not be a problem
> > depending on the memory size of an element in the initial list, and also
> > depending on whether you're recurring over a datastructure, or a
> presumably
> > very long lazy seq), isn't there an impact on CPU usage too ?
>
> It would probably be up to twice as slow, I would say.
> For a list that is continuous in memory and continuations that are
> allocated perfectly in memory,
> you would need to go through twice the same amount of memory.
> (I assume that the main cost here is going through the memory)
>


Isn't this improbable (your assumption about the main cost) ? Even for the
smallest accumulating computation such as doing an addition or consing
things (which requires memory allocation, etc.), I'm not certain that there
wouldn't be near-to-an-order-of-magnitude between the "going through the
memory" and the "accumulator computation" ?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to