On Jan 30, 9:17 pm,
g...@nope.ucsd.edu (Greg Rose) wrote:
> In article <jg70sc$
eh...@reader1.panix.com>, Joe keane <
j...@panix.com> wrote:
> >In article <
b999164d-6981-4d38-a570-bf1ef3c5b...@c21g2000yqi.googlegroups.com>,
> >Earl_Colby_Pottinger <
earlcolby.pottin...@sympatico.ca> wrote:
> >>Basicly, I am trying to find a fast hash system that distributes the
> >>hash pointers very evenly across the hash entries.
> >You are in the wrong froup.
Pardon, a question. What is a froup? Is this a simple mistake, or a
short hand for forum-group? Just asking because either makes sense but
the second one means I am still learning again.
> >What is needed for a decent-performing hash function is vastly different
> >from what is needed for a cryptographically secure hash function.
Depends of what 'decent-performing' means to the person working on the
hash function. In my case to process 160GB of data, the reduction in
collisions is far more important than the speed. I know how to make
very fast hashes including some rolling hash method that keep the
speed up you pay in the number of collisions and under-use of the hash
table space.
> >Time for hash table is roughly:
> > sum[buc = 0..NBUC-1] triangle(size[buc])
triangle = delta? I don't follow. HELP!
> >I'm almost sure that many more people f--- up by not having a good
> >resize algorithm than by using a 'not good enough' hash function.
> > #define FOO_HASH(FOO) ((FOO) >> 7 ^ (FOO) >> 2)
That can't be right, for small valve of FOO it converges to zero.
> >And done, next question please.
Did you leave out anything by chance?
> This seems to discard the two least significant
> bits of FOO, so with very high probability FOO and
> FOO+1 will hash to the same bucket.
I have to agree that this does not look good after looking at it. For
a start if I give a 32 bit value to be hashed, I only get back a 30
bit hashed value. And if I view it as hashing bytes the lowest byte
does not effect the hashed value as much the other bytes. In a good
hash function all input bytes (and bits even) should have equal
effects on the resulting hashed output. Or am I wrong on this too?