+ Reply to Thread
Results 1 to 4 of 4
  1. Junior Member
    Join Date
    Sep 2006
    Location
    Suffolk, UK
    Posts
    7

    Certifications
    Soon I hope!
    #1

    Default Working with Dictionaries

    I am not sure if I have missed something, but I am trying to figure out why you would ever use a Hashtable or a ListDictionary when you have a HybridDictionary.

    ListDictionarys are for small lists, Hashtables are for large, but HybridDictionarys start as a ListDictionary and when the list is large enough they auto upgrade themselves to a HashTable.

    Is there a performance issue or something because I cannot see why you would ever use the HashTable or ListDictionary when you have a HybridDictionary.

    Many thanks,
    Reply With Quote Quote  

  2. SS -->
  3. Senior Member
    Join Date
    Apr 2006
    Posts
    282

    Certifications
    PMP, CISSP, VCP4, C|EH, MCITP:EA, MCSE, MCSA, MCP, MCTS, CST, CNST, Security+, Server+, Network+, A+, iNet+, Linux+
    #2
    Hashtables have been around since the birth of .Net (longer if you talk about other languages).

    Hashtable = dictionary of objects

    ListDictionarys = an array good performance on small lists

    HybridDictionarys = an advanced version of the ListDictionary, a class that upgrades the from a Array to a Dictionary object.

    In sort most people will use a hashtable because it has been around forever.

    That and most of the .net 1.0 developers dont know about the ListDictionarys and HybridDictionarys.
    Reply With Quote Quote  

  4. Certification Invigilator Forum Admin JDMurray's Avatar
    Join Date
    Jul 2003
    Location
    Surf City USA
    Posts
    10,597
    Blog Entries
    50

    Certifications
    GSEC, EnCE, CISSP, SSCP, CEH (ANSI), CASP, CCNA, CCENT, CWSP, CWNA, CWTS, Security+, Server+, Network+, A+, DHTI+, PDI+, MSIT InfoSec
    #3
    Hmmmm...it looks like Lists, ArrayLists, Hashtables, ListDictionarys, and HybridDictionarys would be a good first exam topic study thread for this forum.
    Moderator of the InfoSec, CWNP, IT Jobs, Virtualization, Java, and Microsoft Developers forums at www.techexams.net
    --
    Blog: www.techexams.net/blogs/jdmurray
    LinkedIn: www.linkedin.com/in/jamesdmurray
    Twitter: www.twitter.com/jdmurray
    Reply With Quote Quote  

  5. Junior Member
    Join Date
    Sep 2006
    Location
    Suffolk, UK
    Posts
    7

    Certifications
    Soon I hope!
    #4
    I did some followup testing counting the ticks passed during a lookup and found that listdictionarys are definitely faster with small lists and hashtables are faster for large lists. Adding a hybriddictionary has a performance hit and is without doubt the slowest of the three.

    In my opinion, only use a hybriddictionary when you are truly unsure of the list size.
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks