Performance of Concurrent Collections in .NET 4

Performance of Concurrent Collections in .NET 4

  • Comments 3

.NET 4 introduces new data structures designed to simplify thread-safe access to shared data, and to increase the performance and scalability of multi-threaded applications. To best take advantage of these data structures, it helps to understand their performance characteristics in different scenarios.

Chunyan Song, Emad Omara and Mike Liddell measured the performance of four new concurrent collection types: ConcurrentQueue(T), ConcurrentStack(T), ConcurrentBag(T), and ConcurrentDictionary(TKey, TValue), and published their findings in this paper:

(This paper and many more are available through the Parallel Computing Developer Center on MSDN at http://msdn.microsoft.com/en-us/concurrency/ee851578.aspx.)

Leave a Comment
  • Please add 1 and 4 and type the answer here:
  • Post
  • link to paper is dead.

  • @offler: Thanks.  Fixed link.

  • There's a few shortcomings in this paper:

    1) What is the memory overhead of these collections?

    2) In a scenario with many more reads than writes, how do these collections compare to ReaderWriterLockSlim synchronized collection?

    3) The paper assumes internal synchronization of collections is required but does not discuss the fact the internal synchronization often synchronizes too much (multiple access as part of an algorithm will incur multiple locks). I would have liked to see some examples comparing concurrent collections vs externally synchronized collection rather than naive internally synchronized collection.

    4) Would have been interesting to see some examples with Map/Reduce since it seems to me this would be the kind of scenario where one would want to use concurrent internally synchronized collections.

Page 1 of 1 (3 items)