Map, Reduce, Filter
Dustin Campbell has a couple of posts about Map/Reduce/Filter:
He makes it easy to understand, but he forgot one thing that is important, usage of the Map/Reduce/Filter pattern make it very easy to parallelize your code, since you have already separated everything into an action on a set, which can be performed in parallel safely (in most cases).
Comments
Here's my simple implementation of a threaded ForEach (it needs a workaround for STA threads as WaitAll is not available for them):
Then one can implement a parallelized version of Filter:
Yes, and given a change in the name spaces, it is easy to switch between the two.
Yes, and given a change in the name spaces, it is easy to switch between the two.
Comment preview