benchmarking Perl client hash functions

Brad Fitzpatrick brad@danga.com
Mon, 19 Jul 2004 12:51:10 -0700 (PDT)


On Mon, 19 Jul 2004, Larry Leszczynski wrote:

>
> Do all the clients currently support (or could they support) the hashfunc
> from the Perl client?  i.e.:
>     foreach (split //, shift) {
>         $hash = $hash*33 + ord($_);
>     }
>
> If so, might be nice to support three hash method options something like:
>    'builtin' meaning like the current Perl client
>              (probably need a better name)
>    'crc32'   meaning "(crc32(shift) >> 16) & 0x7fff"

Where does 0x7fff come from?  Or 16 for that matter.

Is there something magic about having 32767 buckets?

- Brad