If you use the HybridDictionary you get better speed under
a certain threshold of elements (not sure what internal
threshold is used, but ILDasm might reveal it).
But still, the Hashtable is fast. If you do use it, call
one of the constructors with the "loadFactor" parameter.
Setting this value to it's miniumum (0.1f) will give you
faster lookups at the cost of more memory and possibly
worst performance in ADDING elements (so you should also
specify the number of elements you wish to add).
Richard
-----Original Message-----
I need to use a class that is a collection of objects
where I can do acomparing operation like this:
col = new FastCollectionClass();
bool b = col.IsThisItemAlreadyInTheCollection(obj);
Where the function to see if an object is already in the
collection isfast. I was thinking of using a HashTable even though I
don't need touse the "key" part of the dictionary since I know
HashTables aredesigned for fast lookup. Any ideas of better classes to
use?
thanks in advance,
John
.