What is the reason behind this huge Performance difference in .Net 4

后端 未结 4 1740
花落未央
花落未央 2021-01-31 05:40

I was just doing some research on RedBlack Tree. I knew that SortedSet class in .Net 4.0 uses RedBlack tree. So I took that part out as is using Reflector and created a RedBlack

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-31 05:55

    1. reverse the order of the tests and repeat the measurement.
    2. randomize your data. Sorted sets behave strangely when you insert pre-sorted data.

提交回复
热议问题