4 ms·
Personally I do not understand the utility of "pmap" - seems interesting, but in practice there are really few scenarios in which it is actually useful. And btw
by bad_user 12y ago
Personally I do not understand the utility of "pmap" - seems interesting, but in practice there are really few scenarios in which it is actually useful. And btw, the given example is extremely awful. Yes I understand it's trying to simulate a long running computation, but that's the problem - if you want to parallelize long running computation, then pmap is not what you want.
- jezclaremurugan 12y agoI frequently use Pool's map in python to achieve the same, so can you elaborate a bit on why that's not what is needed?
- _pmf_ 12y agoI've used it for lazy on-the-fly image scaling transformations (desktop client software), but I agree that it's not really of general interest.
- dj-wonk 12y agoI agree that the given example is not compelling. > "but in practice there are really few scenarios in which it is actually useful" Not true. Parallel mapping is a useful tool for multi-core systems. Clojure (and other languages) include a `pmap` because it provides a simple, elegant way to do parallel computation. If you want parallel mapping with more control, check out Claypoole: > Basically, we just wanted a better pmap. Clojure’s pmap is pretty awesome, but we wanted to be able to control the number of threads we were using, and it was nice to get a few other bonus features. http://eng.climate.com/2014/02/25/claypoole-threadpool-tools-for-clojure/ http://eng.climate.com/2014/02/25/claypoole-threadpool-tools... HN commentary: https://news.ycombinator.com/item?id=7299309 https://news.ycombinator.com/item?id=7299309