part of the hash operations mapping key to an entry in the hash table can be done in one stepbut the time to search the corresponding linked list is based on the length of that list in the worst casethe list will contain all of the keys stored in the hash tableresulting in linear time search as with closed hashingseparate chaining is very efficient in the average case the average time to locate key within the hash table assumes the keys are uniformly distributed across the table and it depends on the average length of the linked lists if the hash table contains keys and entriesthe average list length is which is the same as the load factor deriving equations for the average number of searches in separate chaining is much easier than with closed hashing the average number of comparisons required to locate key in the hash table for successful search is and for an unsuccessful search is + when the load factor is less than (twice the number of keys as compared to the number of table entries)it can be shown that the hash operations only require ( time in the average case this is better average time than that for closed hashingwhich is an advantage of separate chaining the drawback to separate chaininghoweveris the need for additional storage used by the link fields in the nodes of the linked lists hash functions the efficiency of hashing depends in large part on the selection of good hash function as we saw earlierthe purpose of hash function is to map set of search keys to range of index values corresponding to entries in hash table "perfecthash function will map every key to different table entryresulting in no collisions but this is seldom achieved except in cases like our collection of products in which the keys are within small range or when the keys are known beforehand insteadwe try to design good hash function that will distribute the keys across the range of hash table indices as evenly as possible there are several important guidelines to consider in designing or selecting hash functionthe computation should be simple in order to produce quick results the resulting index cannot be random when hash function is applied multiple times to the same keyit must always return the same index value if the key consists of multiple partsevery part should contribute in the computation of the resulting index value the table size should be prime numberespecially when using the modulus operator this can produce better distributions and fewer collisions as it tends to reduce the number of keys that share the same divisor