On Oct 14, 11:54 am, Henk <henkp...@gmail.com> wrote: > (I did some small benchmarks on this), while the list comprehension > itself is much faster than python...
Not an answer to your question, but: depending on what you mean by "much faster", there is a good chance that you measured the clojure for expression doing nothing. You should wrap it in a doall or dorun to get a proper timing (like a generator in Python). Eg: for me, the following are almost exactly the same speed (~45ms): user=> (time (dorun (for [i (range 100000)] [i (* i i)]))) "Elapsed time: 45.965679 msecs" C:\Users\chris>python -m timeit "[(i,i*i) for i in range(100000)]" 10 loops, best of 3: 45.5 msec per loop - Chris -- 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