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.
Download

C Minimal Perfect Hashing Library Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Fabiano Cupertino Botelho and Davi de Castro Reis
  • Publisher web site:

C Minimal Perfect Hashing Library Tags


C Minimal Perfect Hashing Library Description

C Minimal Perfect Hashing Library is a portable LGPL library to create and to work with minimal perfect hashing functions. C Minimal Perfect Hashing Library encapsulates the newest and more efficient algorithms in an easy-to-use, production-quality, fast API. The library was designed to work with big entries that cannot fit in the main memory. It has been used successfully for constructing minimal perfect hash functions for sets with more than 100 million of keys, and we intend to expand this number to the order of billion of keys.A perfect hash function maps a static set of n keys into a set of m integer numbers without collisions, where m is greater than or equal to n. If m is equal to n, the function is called minimal.Minimal perfect hash functions are widely used for memory efficient storage and fast retrieval of items from static sets, such as words in natural languages, reserved words in programming languages or interactive systems, universal resource locations (URLs) in Web search engines, or item sets in data mining techniques. Therefore, there are applications for minimal perfect hash functions in information retrieval systems, database systems, language translation systems, electronic commerce systems, compilers, operating systems, among others.The use of minimal perfect hash functions is, until now, restricted to scenarios where the set of keys being hashed is small, because of the limitations of current algorithms. But in many cases, to deal with huge set of keys is crucial. So, this project gives to the free software community an API that will work with sets in the order of billion of keys.Probably, the most interesting application for minimal perfect hash functions is its use as an indexing structure for databases. The most popular data structure used as an indexing structure in databases is the B+ tree. In fact, the B+ tree is very used for dynamic applications with frequent insertions and deletions of records. However, for applications with sporadic modifications and a huge number of queries the B+ tree is not the best option, because practical deployments of this structure are extremely complex, and perform poorly with very large sets of keys such as those required for the new frontiers database applications.For example, in the information retrieval field, the work with huge collections is a daily task. The simple assignment of ids to web pages of a collection can be a challenging task. While traditional databases simply cannot handle more traffic once the working set of web page urls does not fit in main memory anymore, minimal perfect hash functions can easily scale to hundred of millions of entries, using stock hardware.As there are lots of applications for minimal perfect hash functions, it is important to implement memory and time efficient algorithms for constructing such functions. The lack of similar libraries in the free software world has been the main motivation to create the C Minimal Perfect Hashing Library (gperf is a bit different, since it was conceived to create very fast perfect hash functions for small sets of keys and CMPH Library was conceived to create minimal perfect hash functions for very large sets of keys). C Minimal Perfect Hashing Library is a portable LGPLed library to generate and to work with very efficient minimal perfect hash functions. Here are some key features of "C Minimal Perfect Hashing Library": · Fast. · Space-efficient with main memory usage carefully documented. · The best modern algorithms are available (or at least scheduled for implementation :-)). · Works with in-disk key sets through of using the adapter pattern. · Serialization of hash functions. · Portable C code (currently works on GNU/Linux and WIN32 and is reported to work in OpenBSD and Solaris). · Object oriented implementation. · Easily extensible. · Well encapsulated API aiming binary compatibility through releases. · Free Software. What's New in This Release: · The main novelty of this version is the inclusion of two new algorithms: (i) CHD algorithm and (ii) CHD_PH algorithm. The CHD algorithm can be tuned to generate MPHFs that require approximately 2.07 bits per key to be stored. It outperforms the BDZ and therefore is the fastest one available in the literature for sets that can be treated in internal memory. The CHD_PH algorithm generates PHFs with load factor up to 99 %. If we set the load factor to 81 %, which is the maximum that can be obtained with the BDZ algorithm, the resulting functions can be stored in 1.4 bits per key. The space requirement increases with the load factor. All reported bugs and suggestions have been corrected and included as well.


C Minimal Perfect Hashing Library Related Software