title: Finding a good hash function for Rabin-Karp string search algorithm
body: <p>What are some good hash functions that can be used for implementing <a href="http://en.wikipedia.org/wiki/Rabin-Karp_string_search_algorithm" rel="nofollow">Rabin-Karp string search algorithm</a>? I only know of polynomial hash, but it has some flaws — most notably, if hashing is done modulo 2<sup>64</sup>, there is a test which is guaranteed to produce collisions very often (and using another modulus is impractical because the <code>mod</code> operation is very expensive). So, is there a <strong>fast, easy-to-write</strong> good hash function?</p>
  
  <p>P.S. I know about buzhash, but I am wondering if there are other alternatives…</p>