On Mon, 2013-03-04 at 12:24 -0800, H. S. Teoh wrote:
[…]
> > Is there a way to "parallelize" this kind of operations?
> 
> What do you mean by "parallelize"? Run in multiple threads? I don't
> think you can do that, because the result of filter depends on what it
> gets from map.

This shows the deficiency in thinking of explicit use of threads as the
only way forward. filter → map is a classic pipeline and if processed
using a stream model over a thread pool using work stealing leads to
code that is good. Alternatively do a parallel filter followed by a
parallel map, data paralleism over a thread pool, more good code.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to