Open Addressing

Open addressing, or closed hashing, is a method of collision resolution in hash tables. With this method a hash collision is resolved by probing, or searching through alternate locations in the array (the probe sequence) until either the target record is found, or an unused array slot is found, which indicates that there is no such key in the table. Well known probe sequences include:

Linear probing
in which the interval between probes is fixed — often at 1.
Quadratic probing
in which the interval between probes increases linearly (hence, the indices are described by a quadratic function).
Double hashing
in which the interval between probes is fixed for each record but is computed by another hash function.

The main tradeoffs between these methods are that linear probing has the best cache performance but is most sensitive to clustering, while double hashing has poor cache performance but exhibits virtually no clustering; quadratic probing falls in-between in both areas. Double hashing can also require more computation than other forms of probing. Some open addressing methods, such as last-come-first-served hashing and cuckoo hashing move existing keys around in the array to make room for the new key. This gives better maximum search times than the methods based on probing.

A critical influence on performance of an open addressing hash table is the load factor; that is, the proportion of the slots in the array that are used. As the load factor increases towards 100%, the number of probes that may be required to find or insert a given key rises dramatically. Once the table becomes full, probing algorithms may even fail to terminate. Even with good hash functions, load factors are normally limited to 80%. A poor hash function can exhibit poor performance even at very low load factors by generating significant clustering. What causes hash functions to cluster is not well understood, and it is easy to unintentionally write a hash function which causes severe clustering.

Read more about Open Addressing:  Example Pseudo Code

Famous quotes containing the words open and/or addressing:

    I would not unduly praise the virtue of restraint. It is often merely temperamental. But it is not always a sign of coldness. It may be pride. There can be nothing more humiliating than to see the shaft of one’s emotion miss the mark of either laughter or tears. Nothing more humiliating! And this for the reason that should the mark be missed, should the open display of emotion fail to move, then it must perish unavoidably in disgust or contempt.
    Joseph Conrad (1857–1924)

    He took up his pen, which seemed to parch like a martyr in his hand. He began to write, nevertheless, addressing the nine-and-ninety lies of the moment he hoped with for a night of saloperie at the side of the twisted strumpet, Fiction, who lasciviously rolled her eyes at him, hiked up her skirt, and beckoned him on.
    Alexander Theroux (b. 1940)