On Sun, Mar 14, 2010 at 2:06 PM, Eugen Dück <eu...@dueck.org> wrote:

> I wonder whether we can make any statement about the likeliness of
> this happening in memoize6/7 vs. memoize7-variant or your memoize8,
> although it's unlikely to occur in all scenarios so far that I've
> wanted to use memoize in.
>

Anyway delay is cheap: it creates an object (the dealy itself) and a
closure.
user=> (time (dotimes [_ 1e10] (delay (+ 2 2))))
"Elapsed time: 1552.607315 msecs"
nil
user=> (time (dotimes [_ 1e10] [#(+ 2 2)]))
"Elapsed time: 1734.104963 msecs"
nil

I don't think it's worth worrying about where the delay is created.

Christophe

-- 
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