(pcollect f coll)
(pcollect wrap-fn f coll)
Like pmap but not lazy and more efficient for less computationally intensive functions because there is less coordination overhead. The collection is sliced among the available processors and f is applied to each sub-collection in parallel using map.
Like pmap but not lazy and more efficient for less computationally intensive functions because there is less coordination overhead. The collection is sliced among the available processors and f is applied to each sub-collection in parallel using map.
(pmemoize f)
Memoizes the function f, using the same approach as clojure.core/memoize. The practical difference is that this function provides the gurantee that in spite of parallel invocations of the memoized function each input to f will only ever be memoized once. This resolves an implementation detail in clojure.core/memoize which allows f to be applied to args without locking the cache to prevent other threads duplicating the work.
Memoizes the function f, using the same approach as clojure.core/memoize. The practical difference is that this function provides the gurantee that in spite of parallel invocations of the memoized function each input to f will only ever be memoized once. This resolves an implementation detail in clojure.core/memoize which allows f to be applied to args without locking the cache to prevent other threads duplicating the work.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close