Parallel Integrated Query

PLINQ is the parallel implementation of Linq ( wich stands for integrated query). A parallel executed query on ienumarable of objects can run significantly faster!

AsParallel

var nums = Enumerable.Range(10, 10000);


var query = from num in nums.AsParallel()
            where num % 10 == 0
            select num;

The parallel method is just an extension method which allso can be changed together with for example the AsOrdered extension method wich preserve the order of the collection.

AsOrdered

var nums = Enumerable.Range(10, 10000);


var query = from num in nums.AsParallel().AsOrdered
            where num % 10 == 0
            select num;

Speed

The .AsParallel will definityl speed up your query unless the amount of elements to query is that low that it will not weight againts the overhead of creating a parallel query. The AsOrdered is allso overhead on a query on will slow down a parallel query just as Orderby and join will do. If you output your query with .ToList or .ToArray this recreating the collection will slow down your query allso.

Sequentially mode

If your parallel query contains something like:take, zip, concat these query will be executed sequentially.

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!