Re: Not looking like a fool



On Wed, 01 Feb 2012 21:16:50 -0800, VelCrowPhly
<VelCrowPhly@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

On Tue, 31 Jan 2012 02:17:04 +0000 (UTC), ggr@xxxxxxxxxxxxx (Greg Rose)
wrote:

In article <jg70sc$eh4$1@xxxxxxxxxxxxxxxxx>, Joe keane <jgk@xxxxxxxxx> wrote:
In article <b999164d-6981-4d38-a570-bf1ef3c5b306@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Earl_Colby_Pottinger <earlcolby.pottinger@xxxxxxxxxxxx> 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.

What is needed for a decent-performing hash function is vastly different
from what is needed for a cryptographically secure hash function.

Time for hash table is roughly:

sum[buc = 0..NBUC-1] triangle(size[buc])

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)

And done, next question please.

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.

Greg.

So, does that mean that he FOOked up?

http://www.smokey-stover.com/

.



Relevant Pages

  • Re: Some comments on "super fast hash"
    ... SFH seems reasonably good and certainly is fast. ... > a hash, and SFH does not. ... The latest versions of each hash function which leverages this ... it must behave worse on other key sets. ...
    (comp.programming)
  • Some comments on "super fast hash"
    ... I've implemented a hash function here: ... SFH seems reasonably good and certainly is fast. ... quality of the hash function is not affected by the difference as far ... it must behave worse on other key sets. ...
    (comp.programming)
  • Re: Maximum String size in Java?
    ... >> compilation on any new target platform that does not already have ... Do you have a version of SFH posted with changes to use this file ... If they intend to use a hash ... benefit of 31/33 will sway me into using more than one hash function. ...
    (comp.programming)
  • Re: Suggestions for double-hashing scheme
    ... chain style and reprobe style are basically a wash. ... will be a smaller chance of encountering deleted entries before it. ... Once you sufficiently optimize a hash table, ... by computing of the hash function). ...
    (comp.programming)
  • Re: Maximum String size in Java?
    ... The hash function will *NOT* have the minimal collision ... > for long strings, so on average, SFH bakes it in the performance ...
    (comp.programming)