Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



Mindaugas Rasiukevicius wrote:
> Simon Burge <simonb%NetBSD.org@localhost> wrote:
> > Mindaugas Rasiukevicius wrote:
> > > Simon Burge <simonb%NetBSD.org@localhost> wrote:
> > > > 
> > > > >  [ ... ]
> > > > > 
> > > > > Log Message:
> > > > > 
> > > > > Add MurmurHash2 -- a non-cryptographic hash function by Austin
> > > > > Appleby. The code is taken from the upstream and is in the public
> > > > > domain.
> > > > 
> > > > I'm curious why you've chosen MurmurHash2 instead of MurmurHash3
> > > > given the known problems with MurmurHash2?  Also, should the filename
> > > > have a "2" in it?
> > > 
> > > It meets my needs.
> > 
> > What are your needs?  I don't see this change discussed anywhere.
> 
> I am going to use it in NPF as it shows better characteristics than
> Jenkins lookup3.  It is a very small function.

Thanks for the explaination.

> > > Are you referring to the weakness when using 4-bytes?
> > > Anyway, that is why the file name does not have 2 in it, so that we
> > > could add MurmurHash3 as well.
> > 
> > That's completely different to the other hashes we have in the source
> > tree.  Can you rename the file so that it's consistent please?
> 
> Because other hashes use very different interface, with a context and
> common template in libc (rather horrible macros).  There is no need to
> create a directory for every different version of MurmurHash.  Rather
> undesirable, I would say.

I wasn't talking about creating a directory for every variant of murmur,
just putting each variant in a separate .c file.  Eg:

        src/common/lib/libc/hash/murmurhash/murmurhash2.c
        src/common/lib/libc/hash/murmurhash/murmurhash3.c

Or do you intend on adding other variants of murmur to the current .c
file if/when needed?

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index