[Mono-dev] faster than hashtable?

Alan McGovern alan.mcgovern at gmail.com
Wed Oct 28 13:10:23 EDT 2009


Hey,

On Wed, Oct 28, 2009 at 4:30 PM, pablosantosluac at terra.es <
pablosantosluac at terra.es> wrote:

> Sure Alan!
>
> So, basically, the options are:
>
> - Use a sorted ArrayList and a binary search
>
For this option the same story applies as for Dictionary <K,V>. If you write
a strongly typed sorted list where the key is hardcoded as long, you might
be able to gain a few % in performance. It depends on whether the extra %'s
(if any) are worth the increased maintainer burden. If this is a
super-critical lookup, then it might be worth it.

> - Reimplement hashtable focusing on long keys
> - Write a wrapper to Judy
>
>
Alan.

Alan McGovern wrote:
> > Really what you need to do is benchmark all of the different options
> > using your expected workload. It's near useless us telling you X is
> > faster or Y is better without knowing the workload involved.
> >
> > Alan.
> >
> > On Wed, Oct 28, 2009 at 2:40 PM, pablosantosluac at terra.es
> > <mailto:pablosantosluac at terra.es> <pablosantosluac at terra.es
> > <mailto:pablosantosluac at terra.es>> wrote:
> >
> >     Excellent. Is there a wrapper for C#? Is it worth?
> >
> >     Felipe Lessa wrote:
> >     > On Tue, Oct 27, 2009 at 11:58:31PM +0100,
> >     psantosl at codicesoftware.com <mailto:psantosl at codicesoftware.com>
> wrote:
> >     >> 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?
> >     >
> >     > There are always Judy arrays, see http://judy.sourceforge.net/.
> >     >
> >     > --
> >     > Felipe.
> >     > _______________________________________________
> >     > 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
> >     <mailto: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/ade5811b/attachment.html 


More information about the Mono-devel-list mailing list