Skip to main content


hashing A technique that is used for organizing tables to permit rapid searching or table lookup, and is particularly useful for tables to which items are added in an unpredictable manner, e.g. the symbol table of a compiler. Each item to be placed in the table has a unique key. To place it in the hash table a hash function is used, which maps the keys onto a set of integers (the hash values) that range over the table size. The function is chosen to distribute the keys fairly evenly over the table (see hashing algorithm); since it is not a unique mapping, two different keys may map onto the same integer.

In the simplest version of the technique, the hash value identifies a primary position in the table; if this is already occupied, successive positions are examined until a free one is found (treating the table as circular). The item with its key is inserted in the table at this position. To locate an item in the table a similar algorithm is used. The hash value of the key is computed and the table entry at this position is examined. If the key matches the required key, the item has been located; if not, successive table positions are examined until either an entry with a matching key is found or an empty position is found. In the latter case it can be concluded that the key does not exist in the table, since the insertion procedure would have placed it in this empty position. For the technique to work, there must be rather more table positions than there are entries to be accommodated. Provided that the table is not more than 60% full, an item can on average be located in a hash table by examining at most two table positions.

More sophisticated techniques can be used to deal with the problem of collisions, which occur when the position indicated by the hash value is already occupied; this improves even further the performance of the table lookup. Table lookup and insertion of new items can be interleaved, but if items are deleted from the table the space they occupied cannot normally be reused.

Cite this article
Pick a style below, and copy the text for your bibliography.

  • MLA
  • Chicago
  • APA

"hashing." A Dictionary of Computing. . 19 Feb. 2019 <>.

"hashing." A Dictionary of Computing. . (February 19, 2019).

"hashing." A Dictionary of Computing. . Retrieved February 19, 2019 from

Learn more about citation styles

Citation styles gives you the ability to cite reference entries and articles according to common styles from the Modern Language Association (MLA), The Chicago Manual of Style, and the American Psychological Association (APA).

Within the “Cite this article” tool, pick a style to see how all available information looks when formatted according to that style. Then, copy and paste the text into your bibliography or works cited list.

Because each style has its own formatting nuances that evolve over time and not all information is available for every reference entry or article, cannot guarantee each citation it generates. Therefore, it’s best to use citations as a starting point before checking the style against your school or publication’s requirements and the most-recent information available at these sites:

Modern Language Association

The Chicago Manual of Style

American Psychological Association

  • Most online reference entries and articles do not have page numbers. Therefore, that information is unavailable for most content. However, the date of retrieval is often important. Refer to each style’s convention regarding the best way to format page numbers and retrieval dates.
  • In addition to the MLA, Chicago, and APA styles, your school, university, publication, or institution may have its own requirements for citations. Therefore, be sure to refer to those guidelines when editing your bibliography or works cited list.