3 ms·
So you've at best removed just 8 bytes for rather inconvenient programming for... LinearProbingHashTable<FooBar*, size*2> ChainHashTable<FooBar*, size>
by dragontamer 4y ago
So you've at best removed just 8 bytes for rather inconvenient programming for...
LinearProbingHashTable<FooBar*, size*2>
ChainHashTable<FooBar*, size>
Note that linearProbingHashTable only uses 8 bytes per pointer. While ChainHashPointer still needs nextPtr, taking up 16 bytes.
The *2 is for 50% load factor on linear table. But we still win on linear if we're at say 75% (simple linear) or 95% load factor (which is doable with Robin Hood)