Skip to content

Instantly share code, notes, and snippets.

@ejackson
Created October 31, 2012 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ejackson/3989381 to your computer and use it in GitHub Desktop.
Save ejackson/3989381 to your computer and use it in GitHub Desktop.
(def v (into [] (repeatedly 1e5 #(rand 100))))
(defn rnd [x]
(Math/round x))
(defn prnd ^long [^double x]
(Math/round x))
(time (r/fold + (r/map rnd v)))
(time (r/fold + (r/map prnd v)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment