What is the main implementation idea behind sparse hash table?

后端 未结 2 1811
情歌与酒
情歌与酒 2021-02-12 13:34

Why does Google sparsehash open-source library has two implementations: a dense hashtable and a sparse one?

2条回答
  •  甜味超标
    2021-02-12 14:10

    sparsehash are a memory-efficient way of mapping keys to values (1-2 bits per key). Bloom filters can give you even fewer bits per key, but they don't attach values to keys other than outside/probably-inside, which is slightly less than a bit of information.

提交回复
热议问题