[Mono-dev] faster than hashtable?
pablosantosluac at terra.es
pablosantosluac at terra.es
Wed Oct 28 06:39:30 EDT 2009
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 <tspink at gmail.com
> <mailto:tspink at gmail.com>> wrote:
>
> 2009/10/27 psantosl at codicesoftware.com
> <mailto:psantosl at codicesoftware.com> <psantosl at codicesoftware.com
> <mailto: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
> <mailto:Mono-devel-list at lists.ximian.com>
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list