|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DictionaryBase PerfomanceI want to use DictionaryBase as base class. The search performace matters lot. I have used a hashtable in a similar situation. This class DictionaryBase has a innerhash table so i guess the performace should be the same. Question. Would there be any perforamce difference for searching for the two classes below. Public Class LookUpCollection Inherits DictionaryBase End Class Public Class LookUpCollection private ht As Hashtable end class Thanks all in advance.
Show quote
Hide quote
"parez" <psaw***@gmail.com> wrote in message No, performance is the same. One uses a hashtable, the other uses a news:1143581503.293245.267180@g10g2000cwb.googlegroups.com... > Hi all, > > > I want to use DictionaryBase as base class. The search performace > matters lot. > I have used a hashtable in a similar situation. > > This class DictionaryBase has a innerhash table so i guess the > performace should be the same. > > Question. > > Would there be any perforamce difference for searching for the two > classes below. > > Public Class LookUpCollection > Inherits DictionaryBase > > End Class > > Public Class LookUpCollection > > private ht As Hashtable > > end class > > > Thanks all in advance. > hashtable. Well, it could have a performance difference if you did something different with your private hashtable (for example, the DictionaryBase only creates the hashtable when the InnerHashtable getter is accessed. So, when the Add, Remove, Contains, and GetEnumerator methods are called, and there already isn't a hashtable created for the collection, the one will be created at that time. If you call count, it will return 0 and not create the hashtable if one is not already created. HTH, Mythran
Class question
Form Exit Doing some extra task while saving databind Controls in VB.Net 2005 ? select all text when textbox1 is clicked Auto-stop DUN via VB.Net? SQL Server and ADO.Net best method Dynamically Loading Programs Adding HTML code to project. Re: ContextSwitchDeadlock was detected GetType of custom Property set to nothing |
|||||||||||||||||||||||