Hash coding


programming, algorithm
(Or “hashing”) 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 to select one of a number of “hash buckets” in a hash table. The table contains pointers to the original items.
If, when adding a new item, 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 number of entries and range of keys to be used. The hash function usually depends on the table size so if the table needs to be enlarged it must usually be completely rebuilt.
When you look up a name in the phone book (for example), you typically hash it by extracting its first letter; the hash buckets are the alphabetically ordered letter sections.
See also: btree, checksum, CRC, pseudorandom number, random, random number, soundex.
(1997-08-03)

Read Also:

  • Hash collision

    programming (Or “hash clash”) When two different keys hash to the same value, i.e. to the same location in a hash table. ESR once asked a friend what he expected Berkeley to be like. The friend replied, “Well, I have this mental picture of naked women throwing Molotov cocktails, but I think that’s just a […]

  • Hasheesh

    [hash-eesh, -ish, ha-sheesh, hah-] /ˈhæʃ iʃ, -ɪʃ, hæˈʃiʃ, hɑ-/ noun 1. the flowering tops and leaves of Indian hemp smoked, chewed, or drunk as a narcotic and intoxicant. 2. the dried resinous exudate of the flowering tops of this plant, containing larger amounts of the active ingredient. /ˈhæʃiːʃ; -ɪʃ/ noun 1. a purified resinous extract […]

  • Hashem

    /hɑˈʃɛm/ noun 1. (Judaism) a periphrastic way of referring to God in contexts other than prayer, scriptural reading, etc because the name itself is considered too holy for such use

  • Hashemite-kingdom-of-jordan

    [hash-uh-mahyt] /ˈhæʃ əˌmaɪt/ noun 1. official name of . /ˈhæʃɪˌmaɪt/ noun 1. the official name of Jordan1

  • Hasher

    [hash-er] /ˈhæʃ ər/ noun, Slang. 1. a waiter or waitress, especially in a . noun


Disclaimer: Hash coding definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.