Projects / C Minimal Perfect Hashing Library

C Minimal Perfect Hashing Library

C Minimal Perfect Hashing Library is a portable LGPL library to create and to work with minimal perfect hashing functions. The library encapsulates the newest and more efficient algorithms available in the literature in an easy-to-use, production-quality, fast API. The library is designed to work with big entries that cannot fit in the main memory. It has been used successfully for constructing minimal perfect hashing functions for sets with billions of keys.


Recent releases

  •  09 Jun 2012 07:13

    Release Notes: This release introduces a new experimental C++11 interface (--enable-cxxmph) implementing the BDZ algorithm in a convenient SimpleMPHIndex interface, which serves as the basis for drop-in replacements for std::unordered_map, sparsehash::sparse_hash_map, and sparsehash::dense_hash_map. This gives faster lookup time at the expense of insertion time. cxxmpph/mph_map.h and cxxmph/mph_index.h contain details. As a bonus, most warnings in the C code were removed.

    •  15 May 2011 16:03

      Release Notes: This release fixes a bug in the chd_pc algorithm and reorganizes tests.

      •  10 Sep 2010 01:49

        Release Notes: This is a bugfix only version, after which a revamp of the cmph code and algorithms will be done.

        •  14 Jun 2009 21:40

          Release Notes: This release introduces the CHD algorithm, currently the fastest linear algorithm in the literature for building perfect hash functions and minimal perfect hash functions. The generated functions are also the most compact known to date. Also, the CHD algorithm supports t-perfect hash functions, which can have at most t collisions in a given bin. This allow building hash tables for small key/value pairs that work efficiently with block-based storage, such as hard disks.

          •  06 May 2008 09:18

            Release Notes: This version adds the internal memory bdz algorithm and utility functions to (de)serialize minimal perfect hash functions from mmap'ed memory regions. The new bdz algorithm for minimal perfect hashes requires 2.6 bits per key and is the fastest one currently available in the literature.


            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.