in reply to Re: Fast string hash in portable perl?
in thread Fast string hash in portable perl?

CRC32 is not a good choice for hashing strings for lookup purposes. There are too many collosion hotspots. And MD5 isn't a 32-bit value.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!

  • Comment on Re: Re: Fast string hash in portable perl?

Replies are listed 'Best First'.
Re: Re: Re: Fast string hash in portable perl?
by flyingmoose (Priest) on Dec 19, 2003 at 20:56 UTC

    Not 32 bit? Then just run the B::hash on the MD5! Just kidding folks, just kidding!

    You are exactly right on CRC32. I can't think of any case where CRC32 is really a good choice.

      CRC32 may be a great choice if you use it as the quick test for changes and then use a less collision prone (more time/cpu intensive) hash generator for a secondary test. Kind of what rsync does to speed up the block level checking.


      -Waswas