4 ms·
If I haven't misunderstood you, Clojure does: http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html http://clojure.com/
by berdario 13y ago
If I haven't misunderstood you, Clojure does: http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html http://clojure.com/blog/2012/05/08/reducers-a-library-and-mo...
Also, this talk that I found on HN some time ago explains some of the gory details behind the idea: http://vimeo.com/6624203 http://vimeo.com/6624203
- coldtea 13y ago>* If I haven't misunderstood you, Clojure does* Yes, that's an example of what I was talking about, and I know you can also do it with Apple's Grand Central Dispatch API. But is Clojure's stuff implicit or do you explicitly ask for the parallel thing to happen? What I'm asking is essentially: sure, a reduce/map/filter/etc can potentially run in parallel. But does that ever happen automatically when using common API's for map/reduce/etc, or do you have to explicitly tell it to do so? And if it happens automatically, how does the scheduller knows it's a good idea to run stuff in parallel? For some tasks the overhead might even make the time needed worse.