[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Hash Tables

A hash table is a very fast kind of lookup table, somewhat like an alist in that it maps keys to corresponding values. It differs from an alist in these ways:

Emacs Lisp (starting with Emacs 21) provides a general-purpose hash table data type, along with a series of functions for operating on them. Hash tables have no read syntax, and print in hash notation, like this:

 
(make-hash-table)
     => #<hash-table 'eql nil 0/65 0x83af980>

(The term "hash notation" refers to the initial `#' character---see section 2.1 Printed Representation and Read Syntax---and has nothing to do with the term "hash table.")

Obarrays are also a kind of hash table, but they are a different type of object and are used only for recording interned symbols (see section 8.3 Creating and Interning Symbols).

7.1 Creating Hash Tables  
7.2 Hash Table Access  
7.3 Defining Hash Comparisons  
7.4 Other Hash Table Functions  



This document was generated on May 2, 2002 using texi2html