clojure reduce function uses all cores even though it seems to be single threaded

前端 未结 0 1495
予麋鹿
予麋鹿 2020-11-27 23:28
(defn sum [numbers]
  (reduce + numbers))

(def numbers (into [] (range 0 100000000)))

(time (sum numbers))

The above was the code that was ran.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题