I'm wondering why the code below provides no speedup in the case of r/fold? Am I misunderstanding something about reducers?
I'm running it on a pretty slow (although with 2 cores) Ubuntu 12.04 dev box, both through emacs and lein run, each with the same results.
(require '[clojure.core.reducers :as r])
(.. Runtime getRuntime availableProcessors)
;; 2
(let
[n 80000000
vs #(range n)]
(time (reduce + (vs)))
(time (r/fold + (vs)))
"Elapsed time: 26076.434324 msecs"
"Elapsed time: 25500.234034 msecs"
Thanks.