Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Oct 2014 09:10:10 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= <des@des.no>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, "George V. Neville-Neil" <gnn@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org>, =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= <olivier@cochard.me>, svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys
Message-ID:  <CAPyFy2Cde8r0sRBc2X9fBPqLnb1RCm%2B0abYLpV_%2BW0McRRctkg@mail.gmail.com>
In-Reply-To: <86wq81y9fz.fsf@nine.des.no>
References:  <201410101926.s9AJQRY1049602@svn.freebsd.org> <CA%2Bq%2BTcpt0zEbgu_LndZb4dzh=xykHvppeykuiG6P9cTJgDGeWw@mail.gmail.com> <20141015030455.GC73266@FreeBSD.org> <CAPyFy2CDSwLkTtPFj70tw2iuDam3rS4yFNri=pX0w7_58UYMoA@mail.gmail.com> <86wq81y9fz.fsf@nine.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15 October 2014 05:21, Dag-Erling Sm=C3=B8rgrav <des@des.no> wrote:
>
> That's my fault, and I'm going to change it, because it's illogical.
> The function works on aligned arrays of int32s and should take a count,
> not a size.  I just didn't want to delay the patch even further.

The fact that it works only on aligned 32-bit ints is a detail of this
implementation and not a requirement of murmur3 though. AFAICT common
implementations treat this case as an optimization but handle
arbitrarily aligned buffers of arbitrary numbers of bytes, as is the
case for other hashes in my quick survey.

The reference Jenkins hash looks to be the odd one out here in taking
a uint32_t * and a count rather than a char * or void * and a byte
length.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2Cde8r0sRBc2X9fBPqLnb1RCm%2B0abYLpV_%2BW0McRRctkg>