I am looking for an implementation of a parallel filter algorithm in C#.
myCollection.AsParallel().Where(...);
Source: http://msdn.microsoft.com/en-us/library/dd460714.aspx
You're probably looking for ParallelEnumerable.AsParallel Method
:
var data = Enumerable.Range(1, 100000000).Select(i => i);
var even = data.AsParallel().Where(i => i % 2 == 0);
Edit: The above example is not a good candidate for PLINQ since the mudulo operation is not enough work and the overhead of parallelization will offset most or all of the speedup.
I've copied the links from my own question on the same subject, they are all worth reading.