In which scenarios is Range Separation a better choice than a Chunk section? (and poetic verse)
I already know that
Fragmentation: capturing pieces of elements from input to the process, it starts with small fragments, increases the size of the piece.
Partitioning determines an equal number of elements for each worker
Also why this code: (finding primes up to 100000)
IEnumerable<int> numbers = Enumerable.Range (3, 100000-3);
var parallelQuery = from n in numbers.AsParallel()
where Enumerable.Range (2, (int) Math.Sqrt (n)).All (i => n % i > 0)
select n;
Can it do poorly with range splitting?
So far, this code: (finding the sqrt sum of the first million numbers)
ParallelEnumerable.Range (1, 10000000).Sum (i => Math.Sqrt (i))
Would it be a better choice for range splitting?
source
share