638
edits
(→Method) |
|||
| Line 63: | Line 63: | ||
** The load factor is adjustable. (The hash table size must remain at a power of two, but the data vector can have non-power-of-2 sizes.) However, increasing the load factor directly affects LookupMiss speed. | ** The load factor is adjustable. (The hash table size must remain at a power of two, but the data vector can have non-power-of-2 sizes.) However, increasing the load factor directly affects LookupMiss speed. | ||
** An implementation could grow the data array by less than doubling it each time. I tried this. Insert speed suffered; lookup speed was unaffected; but the modified CloseTable still used more memory than OpenTable. | ** An implementation could grow the data array by less than doubling it each time. I tried this. Insert speed suffered; lookup speed was unaffected; but the modified CloseTable still used more memory than OpenTable. | ||
* <code>dense_hash_map</code> never shrinks the table unless you explicitly ask it to. <code>DenseTable::remove()</code> periodically shrinks, because otherwise, the performance on LookupAfterDeleteTest is pathologically bad. | |||
Benchmark design notes: | Benchmark design notes: | ||
edits