lkml.org 
[lkml]   [1999]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Hash functions (was Re: 2.2.6_andrea2.bz2)
From
Date
Andrea Arcangeli <andrea@e-mind.com> writes:

> On Thu, 6 May 1999, Chuck Lever wrote:
>
> >that's one reason why you don't use the LSB of the multiplication result.
> >instead, it is right-shifted so you get the middle bits, which are much
> >more likely to be "random."
>
> BTW: 2**32*(sqrt(5)-1)/2 is 2654435770 and not 2654425957UL that you are
> using in your hashfn. So were does 2654425957UL came from?

It's a nearby prime.

--
Harvey J. Stein
BFM Financial Research
hjstein@bfr.co.il

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2011 Jasper Spaans