benchmarking Perl client hash functions

Larry Leszczynski
Sun, 18 Jul 2004 09:00:59 -0400 (Eastern Daylight Time)

> > I can probably rig up a patch that uses String::CRC32 if it exists, or
> > falls back to the current algorithm if not - should I go ahead and
> > give that a try?
> That could be disasterous if one client has the module and another
> doesn't.  Sets would go one place, deletes another... would get ugly, not
> to mention low hit rates.

Yuck, forgot about that.  It's too bad the pure-Perl implementation in
Digest::CRC is so painfully slow, that would have made a good fallback.
Maybe I'll poke at it a little and see if there's anything obvious that
could be done to speed it up to the point of being useful.

> I think if we switch, the thing we switch to should be required, or the
> caller must explicitly choose their hashing scheme (when they provide
> more than one server?).

I don't think it would be a big deal to require String::CRC32, it's small
and trivial to build.  Re: your previous post, I think there could some
advantages to having all the different language clients using the same
hashing scheme.