Hi. I manage ASSP (assp.sf.net), a gpl spam filter entirely in perl. I'm looking for a pure perl string hashing subroutine that is as fast as possible with decent hash distribution. Pass a string in and get a 32bit int back. No need for cryptographic security. No need for the same results on different operating systems.
I've thought of unpacking the string as 32bit uints and xor-ing them. That would be fast, but i'm not sure it has ideal distribution over the solution space.
Perl has it's own string hasher built in -- is there an under-the-hood way to get it to process my strings and get ints out? That should be fast and work cross platform.
Or what's your favorite 32bit hash algorythm?