并行执行:
(def data1 (partition 10000000 (range 100000000)))
(dorun data1)
(time (reduce + (pmap #(reduce + %) data1)))
串行执行:
(def data2 (range 100000000))
(dorun data2)
(time (reduce + data2))
量化自我和极简主义的窝藏点
并行执行:
(def data1 (partition 10000000 (range 100000000)))
(dorun data1)
(time (reduce + (pmap #(reduce + %) data1)))
串行执行:
(def data2 (range 100000000))
(dorun data2)
(time (reduce + data2))