473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DictionaryBase Perfomance

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
1 1362

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nick | last post by:
I am writing an application that uses a custom class which inherits DictionaryBase so that I can add items with an associated key. When I try to serialize the object though, I get the following...
4
by: Michael Maercker | last post by:
hi! i'm wondering what the differences are between hashtables und dictionarybases; can both of them store several different types of objects, each accessible by a string key? currently i'm using a...
0
by: a | last post by:
Hi, I am using a SoapFormatter to serialize a class which has a member that is derived from DictionaryBase. Everything works fine... I can serialize and deserialize. The trouble I have is...
0
by: Ric Pullen | last post by:
I've got some code that i found on the net that helps build a flat file structure. It uses an underlying DictionaryBase class, but unfortunately it seems to have a bug you cannot return the...
3
by: marc | last post by:
I want to create a strongly typed collection and use DictionaryBase I add a number of objects but when i loop through the list the data is ordered in a strange maner. How is this possible? Can...
1
by: Masa Ito | last post by:
I am binding objects that inherit from DictionaryBase (Sortedlist and arraylist). I need to access the properties of these DictionaryEntry objects, but I cannot seem to access them by Key & Value,...
0
by: Andrew E Chapman | last post by:
I have a bug that is driving me crazy. I call the remove method on a class inheriting from DictionaryBase and the Dictionary object seems to scramble the inner hashtable, replacing one of the...
4
by: Vivek Sharma | last post by:
Hi, Does anyone know a good example that demonstrates the working of CollectionsBase and DictionaryBase in vs 2005? THanks Vivek
0
by: ferozanna | last post by:
I am using Asp.net 1.3 with C# My application used by call center people My applicaton is a three tier arch I have create data layer as class ibrary which goint to talke Ssqlserver 205 db ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.