<P> For this reason, chained hash tables remain effective even when the number of table entries n is much higher than the number of slots . For example, a chained hash table with 1000 slots and 10,000 stored keys (load factor 10) is five to ten times slower than a 10,000 - slot table (load factor 1); but still 1000 times faster than a plain sequential list . </P> <P> For separate - chaining, the worst - case scenario is when all entries are inserted into the same bucket, in which case the hash table is ineffective and the cost is that of searching the bucket data structure . If the latter is a linear list, the lookup procedure may have to scan all its entries, so the worst - case cost is proportional to the number n of entries in the table . </P> <P> The bucket chains are often searched sequentially using the order the entries were added to the bucket . If the load factor is large and some keys are more likely to come up than others, then rearranging the chain with a move - to - front heuristic may be effective . More sophisticated data structures, such as balanced search trees, are worth considering only if the load factor is large (about 10 or more), or if the hash distribution is likely to be very non-uniform, or if one must guarantee good performance even in a worst - case scenario . However, using a larger table and / or a better hash function may be even more effective in those cases . </P> <P> Chained hash tables also inherit the disadvantages of linked lists . When storing small keys and values, the space overhead of the next pointer in each entry record can be significant . An additional disadvantage is that traversing a linked list has poor cache performance, making the processor cache ineffective . </P>

Advantages of hash table over direct address table