A width agnostic hash function

From: Clint Olsen (clint_at_0lsen.net)
Date: 03/30/04


Date: Mon, 29 Mar 2004 22:19:22 GMT

Hello:

I've been doing reading on hash functions (with C implementations), and
I've noticed that all the techniques used have made certain assumptions
about the architecture width. You see specialized functions for 32-bit and
64-bit respectively. But can it be done in a way where sufficient mixing
is done where the width is either determined at runtime or dealt with in a
more general way?

Here are links to some relevant work performed thus far:

Jenkins:

http://burtleburtle.net/bob/hash/doobs.html

FNV:

http://www.isthe.com/chongo/tech/comp/fnv

Now that we're on the cusp of having quite a few 32 and 64-bit systems
deployed simultaneously, it seems like it might be worth the effort to have
functions which are not so dependent on the width of an unsigned long.

Thanks,

-Clint



Relevant Pages

  • A width agnostic hash function
    ... I've been doing reading on hash functions (with C implementations), ... I've noticed that all the techniques used have made certain assumptions ... about the architecture width. ...
    (comp.programming)
  • Re: A width agnostic hash function
    ... > I've been doing reading on hash functions, ... doesn't appear that the "architecture width" enters the ... The variant implementations deliver hash values ...
    (comp.lang.c)
  • Re: A width agnostic hash function
    ... > I've been doing reading on hash functions, ... doesn't appear that the "architecture width" enters the ... The variant implementations deliver hash values ...
    (comp.programming)
  • OoO VAX (was: Code density and performance?)
    ... What architectural feature of the VAX would be a problem in the ... >some UNIX, they just couldn't compete. ... 386 architecture, too. ... >> either with pre-decode bits (as used in various 386 implementations), ...
    (comp.arch)
  • RE: generic strncpy - off-by-one error
    ... > To: Peter Kjellerstedt ... Cannot do that as the first loop modifies count. ... In my later implementations this is not possible any longer. ... Remember that many architectures already have their own architecture ...
    (Linux-Kernel)