Why is mapping/reducing with reducers library has worse performance than normal map/reduce?
user=> (time (reduce + (map inc (range 100000000))))
"Elapsed time: 14412.627966 msecs"
5000000050000000
user=> (time (reduce + (r/map inc (range 100000000))))
... (C-c)
user=> (time (r/reduce + (r/map inc (range 100000000))))
....(C-c)
I had two kill the later two as it takes indefinitely long. What is wrong here?
EDIT: It seems like other languages also have similar problems. Scala seems to be breaking at a million only. Why do Scala parallel collections sometimes cause an OutOfMemoryError? . While clojure reducers are faster than normal at a million.