[Mono-dev] faster than hashtable?

Alan McGovern alan.mcgovern at gmail.com
Wed Oct 28 05:14:43 EDT 2009

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.


On Wed, Oct 28, 2009 at 8:25 AM, Tom Spink <tspink at gmail.com> wrote:

> 2009/10/27 psantosl at codicesoftware.com <psantosl at codicesoftware.com>:
> > 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
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091028/4e6d1f35/attachment.html 

More information about the Mono-devel-list mailing list