Posted an article about System.Collections.ArrayList performance [Gang Peng]

Comments (4)

  1. Anonymous says:

    Are all the collection classes implemented the same way in Rotor and the .Net framework? Since this is the BCL team’s blog, I’m assuming you would know for sure.

    BTW I’ve always disliked the fact the .Net f/w documentation doesn’t talk about the time complexities of the collection classes as clearly as the C++ standard’s STL part does. Take a look at Bjarne’s book and see how clearly he lists out the time complexities of various STL classes and the tradeoff’s involved. So here’s a difference between a documentation by a programmer versus just a documentation guy who has to pick on the brains of some busy developer for information.

    Another question I have is why do the Synchronised wrapper classes do a blind lock for every function? Why doesn’t it do something smart like a reader write lock etc? For example how does it matter how many threads are simultaneously trying to read the count of a collection? Why go to the cost of an expensive lock for something that is only read by various threads? I was shocked to see the source for some of the synchronised wrappers and see what a trivial implementation it is.

    I’m hoping someone on the BCL team really reads these blogs and answers questions here.

  2. Anonymous says:

    The collection classes are implemented the same way in Rotor and the .Net framework.

    We are trying to make our document better. This article is part of the effort. I will write articles about other classes and a summary about most collection classes. Feel free to tell what classes are the most important one for you, so I can prioritize my work.

    Synchronized Wrapper is a broken idea. We removed them from generic collections. Brad talked about before:

    I will blog about the SyncRoot problem soon.

  3. Anonymous says:

    The classes that I think would benefit from some more explanation are the more specialised ones, like for example the SortedList. What are the time complexities involved in its use versus Hashtable. Of course one can deduce based on what its doing but it would be nice to see that confirmed and documented.