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

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

  • Comments 4

http://blogs.msdn.com/bclteam/articles/273454.aspx

  • 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.
  • 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:
    http://blogs.msdn.com/brada/archive/2003/09/28/50391.aspx

    I will blog about the SyncRoot problem soon.



  • 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.
  • Really good topic, I hope your give me more iformation about this topic.Thanks!http://ds1980.s31.xrea.com/ http://myself.s55.xrea.com/ http://ksks.k2.xrea.com/ http://cccc.k2.xrea.com/ http://eom.k2.xrea.com/ http://kghsjg.k1.xrea.com/ http://hih.k1.xrea.com/ http://www.hotindex.net/ http://en.hotindex.net/
Page 1 of 1 (4 items)