Hashing in Smalltalk

25 February, 2008

Hashing in SmalltalkAndrés Valloud has just published “Hashing in Smalltalk: Theory and Practice” on Lulu. He describes the book as providing “a strong foundation for hashing, hash functions, and their application in the context of software development. The first part develops hashing and hash functions from first principles. The behavior characteristics required of hash functions are examined in detail. A thorough description of how hash functions are constructed follows, complete with a rich survey of existing hash functions. But often times existing hash functions are inappropriate for the task at hand. To address this problem, the second part shows how to build novel hash functions that are both efficient and of very high quality for many of the types of data that occur in practice.”

The book compares algorithms and implementations of hashing across the main Smalltalks (Squeak, Dolphin, Visual Works and VisualAge), as well as other languages including C, C++, C#, Java, OCaml and ML. It’s available for $40/€32.20/£22.04 .

Andrés has also posted a great illustration of the dangers of the use of inappropriate hashing functions.