the key to the rabin–karp algorithm's performance is the efficient computation of hash values of the successive substrings of the text. the rabin fingerprint is a popular and effective rolling hash function. the hash function described here is not a rabin fingerprint, but it works equally well. it treats every substring as a number in some base, the base being usually the size of the character set.