By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

DictionaryBase Perfomance

P: n/a
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.

Mar 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"parez" <ps*****@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.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.


No, performance is the same. One uses a hashtable, the other uses a
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

Mar 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.