c# - What is the difference between EnumerablePartitionerOptions.NoBuffering and not using Partitioner at all? -


in case have collection of objects each object's process takes lots of time, difference between enumerablepartitioneroptions.nobuffering , not using partitioner @ all?

http://msdn.microsoft.com/en-us/library/system.collections.concurrent.enumerablepartitioneroptions.aspx

enumerablepartitioneroptions.nobuffering:

create partitioner takes items source enumerable 1 @ time , not use intermediate storage can accessed more efficiently multiple threads. option provides support low latency (items processed available source) , provides partial support dependencies between items (a thread cannot deadlock waiting item thread responsible processing).

thank you.

update: faster? , why?

ienumerable<int> numbers1 = enumerable.range(1, 100); parallel.foreach(numbers1, (number1) => veryexpensivemethod(number1));             //             // partitioner<int> numbers2 = partitioner.create(enumerable.range(1, 100),   enumerablepartitioneroptions.nobuffering); parallel.foreach(numbers2, (number1) => veryexpensivemethod(number1)); 


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -