On Tue, Aug 10, 2010 at 2:21 AM, Nicolas Oury <nicolas.o...@gmail.com> wrote: > 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)
I don't think this is true. See comment at bottom of http://www.htdp.org/2001-09-22/Book/node163.htm: "People who encounter accumulator-style programming for the first time often get the impression that they are always faster or easier to understand (design) than their recursive counterparts. Both parts are plain wrong. While it is impossible to deal with the full scope of the mistake, let us take a look at a small counterexample. Consider the following table: [Go to link to see table] ... The table shows that the performance of the accumulator-style version of factorial is always worse than that of the original factorial function." -- 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