hashing

(Or "hash coding"). A scheme for providing rapid access to data items which are distinguished by some key. Each data item to be stored is associated with a key, e.g. the name of a person. A hash function is applied to the item's key and the resulting hash value is used as an index into a hash table. The table contains pointers to the original items. If the hash table already has an entry at the indicated location then that entry's key must be compared with the given key to see if it is the same. If two items' keys hash to the same value (a "hash collision") then some alternative location is used (e.g. the next free location cyclically following the indicated one). For best performance, the table size and hash function must be tailored to the range of keys to be used.

(05 Jan 1995)