RS hash calculator

Use this tool to quickly calculate RS hashes.

Use this tool to quickly calculate RS hashes.

Write or paste your text in the box below


RS hash

RS hash is simple hash function from Robert Sedgwick's book "Algorithms in C book". Returned hash is 32 bits long. Function is sometimes used in hashing tables due to it's speed.

The RS hash algorithm offers an ingenious approach to hashing. By combining the benefits of radix multiplication and modular arithmetic, RS hash achieves impressive distribution uniformity while minimizing collisions. This technique involves utilizing random odd integers as coefficients to disperse input values across hash buckets, enhancing performance in various data structures like hash tables. Sedgewick's innovation lies in its simplicity and remarkable collision reduction, bolstering efficiency and maintaining integrity in numerous applications. RShash offers better data manipulation and retrieval in diverse computational domains.