3 ms·
But it's a vital point that 'range' doesn't allocate the whole list - it generates the head of a lazy seq. So the Clojure form CAN be compiled to be nearly as f
by lukev 16y ago
But it's a vital point that 'range' doesn't allocate the whole list - it generates the head of a lazy seq. So the Clojure form CAN be compiled to be nearly as fast as the CL one.
Why do optimization by hand when you can write something conceptually cleaner and let the compiler do it for you?