sparsehash

Introduction

An extremely memory-efficient hash_map implementation. 2 bits/entry overhead! The SparseHash library contains several hash-map implementations, including implementations that optimize for space or speed.

These hashtable implementations are similar in API to SGI's hash_map class and the tr1 unordered_map class, but with different performance characteristics. It's easy to replace hash_map or unordered_map by sparse_hash_map or dense_hash_map in C++ code.

They also contain code to serialize and unserialize from disk.

Usage

Compute Systems Invocation Version(s)
Red Hat Linux (64-bit) % /util/sparsehash/* 2.0.1 (default)

Notes

  1. Specify includes as:
    
    #include <iostream>
    #include <google/sparse_hash_map>
    
    

    and then compile with:

    
    % g++ -I /util/sparsehash/include/ sample.cpp
    
    

People

  1. Rohini Srihari, requestor.

References

  1. http://en.wikipedia.org/wiki/Hash_table
  2. http://code.google.com/p/sparsehash/
  3. http://google-sparsehash.googlecode.com/svn/trunk/doc/sparse_hash_map.html