On Tue, Jun 23, 2009 at 9:14 PM, Daniel Lyons <fus...@storytotell.org>wrote:
> > Wish it were so, because I like your theory better than my reality: :) > Drat! Stupid reality! Now I have to bend it to make my theory valid. range is wily, it bit me before. It's a specialized seq. Can we try with a regular lazy-seq? user=> (dotimes [_ 10] (time (apply + (take 1000000 (iterate inc 0))))) "Elapsed time: 1033.9173 msecs" "Elapsed time: 1123.099025 msecs" "Elapsed time: 1393.07377 msecs" "Elapsed time: 1091.260202 msecs" "Elapsed time: 1031.521464 msecs" "Elapsed time: 993.97605 msecs" "Elapsed time: 964.909367 msecs" "Elapsed time: 1004.735937 msecs" "Elapsed time: 1113.822776 msecs" "Elapsed time: 994.489104 msecs" nil user=> (dotimes [_ 10] (time (reduce + (take 1000000 (iterate inc 0))))) "Elapsed time: 486.111713 msecs" "Elapsed time: 295.508019 msecs" "Elapsed time: 290.850443 msecs" "Elapsed time: 291.644888 msecs" "Elapsed time: 290.163834 msecs" "Elapsed time: 298.254597 msecs" "Elapsed time: 288.870373 msecs" "Elapsed time: 314.193563 msecs" "Elapsed time: 295.104755 msecs" "Elapsed time: 288.079002 msecs" nil Does this hack make your reality valid too? ;-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---