Thanks,

Good to know! I'll give it a try.

Alan McGovern wrote:
> If the key is random, a hashtable is the fastest way. You may be able to
> eke some extra speed out of the Dictionary<K, V> class by ripping all
> the code to support generic keys and instead hardcode the key to always
> be a long. That should save a bit of time, though whether it'd be
> noticable or not I don't know.
> 
> Alan.
> 
> On Wed, Oct 28, 2009 at 8:25 AM, Tom Spink <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     2009/10/27 [email protected]
>     <mailto:[email protected]> <[email protected]
>     <mailto:[email protected]>>:
>     > Hi,
>     >
>     > If you need to store key/value pairs, where the key will be ALWAYS a
>     > unique long (no collisions), is there anything better than a
>     Hashtable?
>     >
>     > Thanks
>     >
>     >        pablo
> 
>     Presumably, though, the key can span the entire range of a long?  If
>     it's an acceptably small range, you could use an array.
> 
>     --
>     Tom Spink
>     _______________________________________________
>     Mono-devel-list mailing list
>     [email protected]
>     <mailto:[email protected]>
>     http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-devel-list mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to