Created
November 1, 2009 12:38
-
-
Save ato/223515 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def randArray | |
(for [y (range 100)] | |
(persistent! | |
(reduce (fn [v _] (conj! v (rand))) | |
(transient []) (range (* 100 1000)))))) | |
(def sums (map #(reduce + %) randArray)) | |
(time (dorun (map println sums))) | |
"Elapsed time: 4525.053846 msecs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment