Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4696 Discussions

.net profiling shows Hashtable performance 3 times generic dictionary <string, string>

aliaslam
Beginner
139 Views

I compared the performance of a HashTable againsta generic Dictionary and results show picking 100000 values from a dictionary took 75 percent of the time compared to HashTable which took 25% of the time. Both were called from same method like below

private void CompareDictionaries()

{

GetItemsFromHashTable();

GetItemsFromDictionary();

}

When we look at results in call list with CompareDictionaries method selected, GetItemsFromHashTable seems to show 25% contribution whereas GetItemsFromDictionary contributed 75 percent.

Both collections were filled with same name value pairs.

A stopwatch timer around these methods show they are taking equal time. The Visual Studio 2005 performance analyzer also shows the same. Why are results different in call list?

0 Kudos
0 Replies
Reply