Implementation of sparse_hash_map, dense_hash_map, and sparsetable
http://google-sparsehash.googlecode.com/svn/trunk/doc/implementation.html
google::dense_hash_map 使ってみたら速かった,それの実装についての説明
実装
- sparsetable
- ちょっとスパースぐらいの配列を実現
- ブロックに分け,各ブロックに(ビットマップ,1 になってるとこ用可変長配列)
- sparse_hash_map
- sparsetable を使ったハッシュ辞書
- 開番地法,quadratic probing
- http://en.wikipedia.org/wiki/Quadratic_probing
- この実装では三角数を使うと書いてあった
- dense_hash_map
- sparsetable の変わりに配列になっているだけ