storing the hash multiplier instead of the hash value
Sea Kelly
sean at invisibleduck.org
Tue Mar 30 12:17:20 PDT 2010
I like murmurhash as well, and I'd even had it in druntime briefly, but
it uses a proprietary license and I couldn't get permision from the
author to use it. It's also an order of magnitude slower on sparc than
x86.
Fawzi Mohamed <fawzi at gmx.ch> wrote:
>
> On 22-mar-10, at 21:04, Andrei Alexandrescu wrote:
>
> > On 03/22/2010 02:50 PM, Daniel Keep wrote:
> >> Sadly, I lack the background to make any sort of objective >>
> > > judgement of
> >> the hash function *itself*, so I'll just reiterate what I've heard
> >> repeated to me over and over again by numerous people: D's builtin
> > > >> hash
> >> function sucks like a black holes.
> >
> > Then you might be glad to hear that Walter has recently improved the
> > > default hashtable implementation significantly (at least for
> > heavy- > duty applications).
> >
> > We're using Paul Hsieh's hash function for strings and general >
> > memory, which is no slouch.
> >
> > http://www.dsource.org/projects/druntime/browser/trunk/src/rt/util/hash.d
> >
> > Better suggestions are always welcome. For integrals I'm unclear on
> > > what we could use to make things better. (Clearly we could and >
> > > should get rid of the extraneous field.)
>
> I like murmurhash, that I what I put into tango, see
> http://www.dsource.org/projects/tango/browser/trunk/tango/core/rt/compiler/util/hash.d
> all that file is based on freely available code and written by me, and
> I give my code with whatever license would be needed.
> I think that the public interface should be exposed (or re-exposed)
> somewhere to the outside so that one can easily create efficient
> hashes for user defined types.
> For example it is nice to be able to chain hash functions (something
> that the default one does not allow).
>
> Fawzi
>
>
More information about the Digitalmars-d
mailing list