This post is covering a subset of what I am talking in my talk How I stopped worrying and learned to love parallel processing (currently only in polish).
This will cover on how, in terms of performance, AsParallel can kick you in a place where it hurts a lot, simultaneously being a blessing in terms of… performance. How is that? Let’s look at some
- parallelize the LINQ query.
- take care of all thread management and synchronization.
- adjust the number of Tasks automatically.
- not require any additional code changes except for
And in the vast majority of cases, this promise was kept! For example look at this code:Continue reading...