well, for fork-join-based parallelism I was using this:
(defn fold-into-vec [chunk coll]
"Provided a reducer, concatenate into a vector.
Same as (into [] coll), but parallel."
(r/fold chunk (r/monoid into vector) conj coll))
(defn rmap
"A fork-join based mapping function that pours the results in a
vector."
[f coll fj-chunk-size]
(fold-into-vec fj-chunk-size (r/map f (vec coll))))
where 'fold-into-vec' is taken from
http://www.thebusby.com/2012/07/tips-tricks-with-clojure-reducers.html
basically, the only difference is the reducing/combining fns...you
suggest r/cat & r/append! whereas I'm using (r/monoid into
vector) and conj.
from a quick look in reducers.clj it seems that cat uses an
ArrayList underneath...is this why it's considered high-performance?
I also see there is 'foldcat' which is
(fold cat append! coll) - exacly what you
're sugegsting! interesting stuff...I'll try it now :)
Jim