how to efficiently apply a medium-weight function in parallel

前端 未结 4 611
广开言路
广开言路 2020-12-30 07:51

I\'m looking to map a modestly-expensive function onto a large lazy seq in parallel. pmap is great but i\'m loosing to much to context switching. I think I need

4条回答
  •  萌比男神i
    2020-12-30 08:15

    How about using the partition function to break up your range sequence? There was an interesting post on a similar problem at http://www.fatvat.co.uk/2009/05/jvisualvm-and-clojure.html

提交回复
热议问题