Clojure and me has moved.

Wednesday, November 19, 2008

Surprising

This post has moved, go to its new location
user=> (time (dotimes [i 100000000] [i]))
"Elapsed time: 5928.406543 msecs"
nil
user=> (time (dotimes [i 100000000] #(i)))
"Elapsed time: 1774.025749 msecs"
nil
So, it seems that creating a closure is faster than creating a vector. Cool.