Running MurmurHash, a simple but speedy hashing algorithm

Sometimes, the priority of a hashing function should be in maximizing its computation speed. The MurmurHash algorithm exists for this reason. When dealing with massive data sets, speed is essential.

Tip

There are negative qualities of a fast hashing algorithm. If hashing algorithm A is 10 times faster than hashing algorithm B, then it's also 10 times faster to stumble upon the content used to create a digest with A than with B using a random content search. A hashing algorithm should be fast, but not so fast as to impact the security of the algorithm.

Getting ready

Install the Murmur hashing algorithm from Cabal as follows:

$ cabal install murmur-hash

How to do it…

  1. Import the Murmur hashing ...

Get Haskell Data Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.