I need help in creating a custom partitioner for PLINQ that will let me iterate over IEnumerable with length greater than Int32.
This is in reference to this question where the answer given to me was write a custom partitioner:
PLINQ query giving overflow exception
I have tried messing around with these from Dr. Dobbs tutorial but I'm not sure what I need to override to use a long for the index:
http://www.drdobbs.com/windows/custom-parallel-partitioning-with-net-4/224600406?pgno=3
Maybe I'm not going about this in the right way.
I can use Parallel.ForEach all day for any size that the IEnumerable I'm iterating over gets to.
But it's much slower than using PLINQ, which would make sense seeing that every iteration is a set of calculations on a combination of letters/numbers and it's the same calculation for every string combination, and I've read that Parallel.ForEach isn't best suited for this. PLINQ is using chunk partitioning and I believe that's why it's doing the iterations so much faster.
Is there a way I can tune Parallel.ForEach to give me the same speed as PLINQ but at the same time allow me to iterate over sizes greater than 2.14 billion?
ETA: Is there no solution to this, starting to thing after seeing Custom partition examples they have nothing to do with the issue of int to long.