Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /impnotes/make-hash.html [b3bc95] .. [9d04bd] Maximize Restore

  Switch to side-by-side view

--- a/impnotes/make-hash.html
+++ b/impnotes/make-hash.html
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>18.2. Function MAKE-HASH-TABLE</title><link rel="stylesheet" href="impnotes.css" type="text/css" /><link rev="made" href="mailto:clisp-list@lists.sourceforge.net" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="Implementation Notes for GNU CLISP" /><link rel="up" href="hash.html" title="Chapter 18. Hash Tables" /><link rel="prev" href="hash-mod-key.html" title="18.1. Modifying Hash Table Keys" /><link rel="next" href="defhash.html" title="18.3. Macro EXT:DEFINE-HASH-TABLE-TEST" /><link rel="copyright" href="legalese.html" title="Legal Status of the CLISP Implementation Notes" /><meta name="date" content="'generated: 2008-10-23 21:32:48-05:00'" /><link rel="author" title="Authors" href="index.html#authors" /><link rel="contents" title="Table of Contents" href="index.html" /><link rel="glossary" href="glossary.html" /><link rel="help" href="faq.html#faq-help" title="How do I ask for help?" /><link rel="home" title="Home" href="http://clisp.cons.org" /><link rel="index" href="idx.html" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">18.2. Function <code class="function">MAKE-HASH-TABLE</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="hash-mod-key.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Hash Tables </th><td width="20%" align="right"> <a accesskey="n" href="defhash.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="make-hash"></a>18.2. Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-hash-table.html" target="_top"><code class="function">MAKE-HASH-TABLE</code></a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="make-hash.html#hashtable-gc-rehash">18.2.1. Interaction between <code class="classname">HASH-TABLE</code>s and garbage-collection</a></span></dt></dl></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-hash-table.html" target="_top"><code class="function">MAKE-HASH-TABLE</code></a> accepts two additional keyword arguments
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>18.2. Function MAKE-HASH-TABLE</title><link rel="stylesheet" href="impnotes.css" type="text/css" /><link rev="made" href="mailto:clisp-list@lists.sourceforge.net" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8465" /><link rel="home" href="index.html" title="Implementation Notes for GNU CLISP" /><link rel="up" href="hash.html" title="Chapter 18. Hash Tables" /><link rel="prev" href="hash-mod-key.html" title="18.1. Modifying Hash Table Keys" /><link rel="next" href="defhash.html" title="18.3. Macro EXT:DEFINE-HASH-TABLE-TEST" /><link rel="copyright" href="legalese.html" title="Legal Status of the CLISP Implementation Notes" /><meta name="date" content="'generated: 2009-07-28 12:48:49-04:00'" /><link rel="author" title="Authors" href="index.html#authors" /><link rel="contents" title="Table of Contents" href="index.html" /><link rel="glossary" href="glossary.html" /><link rel="help" href="faq.html#faq-help" title="How do I ask for help?" /><link rel="home" title="Home" href="http://clisp.cons.org" /><link rel="index" href="idx.html" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">18.2. Function <code class="function">MAKE-HASH-TABLE</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="hash-mod-key.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Hash Tables </th><td width="20%" align="right"> <a accesskey="n" href="defhash.html">Next</a></td></tr></table><hr /></div><div class="section" title="18.2. Function MAKE-HASH-TABLE"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="make-hash"></a>18.2. Function <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_make-hash-table.html" target="_top"><code class="function">MAKE-HASH-TABLE</code></a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="make-hash.html#hashtable-gc-rehash">18.2.1. Interaction between <code class="classname">HASH-TABLE</code>s and garbage-collection</a></span></dt></dl></div><p><a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_make-hash-table.html" target="_top"><code class="function">MAKE-HASH-TABLE</code></a> accepts two additional keyword arguments
  <code class="constant">:INITIAL-CONTENTS</code> and <code class="constant">:WEAK</code>:</p><pre class="programlisting">
-(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-hash-table.html" target="_top"><code class="function">MAKE-HASH-TABLE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&amp;KEY</code></a> :TEST :INITIAL-CONTENTS :SIZE
+(<a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_make-hash-table.html" target="_top"><code class="function">MAKE-HASH-TABLE</code></a> <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&amp;KEY</code></a> :TEST :INITIAL-CONTENTS :SIZE
                  :REHASH-SIZE :REHASH-THRESHOLD
                  :WARN-IF-NEEDS-REHASH-AFTER-GC :WEAK)
-</pre><p>The <code class="constant">:TEST</code> argument can be, other than one of the symbols <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equalp.html" target="_top"><code class="function">EQUALP</code></a>, one of the symbols <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a> and
- <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>.  Both of these tests use <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> as the comparison
+</pre><p>The <code class="constant">:TEST</code> argument can be, other than one of the symbols <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>,
+ <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a>, <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a>, <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_equalp.html" target="_top"><code class="function">EQUALP</code></a>, one of the symbols <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a> and
+ <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>.  Both of these tests use <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> as the comparison
  function; they differ in their performance characteristics.
  </p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a></span></dt><dd>This uses the fastest possible hash function.
      Its drawback is that its hash codes become invalid at every <a href="gc.html" class="olink">garbage-collect</a>ion
@@ -16,78 +16,80 @@
      access after each <a href="gc.html" class="olink">garbage-collect</a>ion. Especially when generational <a href="gc.html" class="olink">garbage-collect</a>ion is used,
      which leads to frequent small <a href="gc.html" class="olink">garbage-collect</a>ions, large hash table with this test
      can lead to scalability problems.</dd><dt><span class="term"><a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a></span></dt><dd>This uses a slower hash function that has the
-     property that its hash codes for instances of the classes <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>,
-     <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STANDARD-STABLEHASH</code></a> (subclass of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_standard-object.html" target="_top"><code class="classname">STANDARD-OBJECT</code></a>) and
-     <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STRUCTURE-STABLEHASH</code></a> (subclass of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a>) are
+     property that its hash codes for instances of the classes <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>,
+     <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STANDARD-STABLEHASH</code></a> (subclass of <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/cla_standard-object.html" target="_top"><code class="classname">STANDARD-OBJECT</code></a>) and
+     <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STRUCTURE-STABLEHASH</code></a> (subclass of <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a>) are
      stable across GCs.
      This test can thus avoid the scalability problems if all keys,
-     other than <a class="link" href="lisp-obj-in-c.html#immediate-o" title="Immediate objects">immediate object</a>s, are <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>, <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STANDARD-STABLEHASH</code></a> or
+     other than <a class="link" href="lisp-obj-in-c.html#immediate-o" title="Immediate objects">immediate object</a>s, are <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>, <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STANDARD-STABLEHASH</code></a> or
      <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STRUCTURE-STABLEHASH</code></a> instances.</dd></dl></div><p>
  One can recommend to use <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a> for short-lived hash tables.
  For tables with a longer lifespan which can be big or accessed
  frequently, it is recommended to use <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>, and to modify the
  objects that are used as its keys to become instances of
  <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STANDARD-STABLEHASH</code></a> or <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STRUCTURE-STABLEHASH</code></a>.
-</p><p>When the symbol <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> or the function <code class="literal">#'eq</code> is
+</p><p>When the symbol <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> or the function <code class="literal">#'eq</code> is
 used as a <code class="constant">:TEST</code> argument, the value of the variable
-<code class="varname">CUSTOM:*EQ-HASHFUNCTION*</code> is used instead.
+ <strong class="first"><em class="firstterm"><code class="varname">CUSTOM:*EQ-HASHFUNCTION*</code>
+  <a id="eq-hashfunction" class="indexterm"></a></em></strong> is used instead.
 This value must be one of <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a>, <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>.</p><p>Similarly, the <code class="constant">:TEST</code> argument can also be one
  of the symbols <code class="constant">EXT:FASTHASH-EQL</code>,
  <code class="constant">EXT:STABLEHASH-EQL</code>,
  <code class="constant">EXT:FASTHASH-EQUAL</code>,
  <code class="constant">EXT:STABLEHASH-EQUAL</code>.
  The same remarks apply as for <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a> and <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>.
- When the symbol <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> or the function <code class="literal">#'eql</code> is used
+ When the symbol <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> or the function <code class="literal">#'eql</code> is used
  as a <code class="constant">:TEST</code> argument, the value of the variable
- <code class="varname">CUSTOM:*EQL-HASHFUNCTION*</code> is used instead;
- this value must be one of <code class="constant">EXT:FASTHASH-EQL</code>,
+ <strong class="first"><em class="firstterm"><code class="varname">CUSTOM:*EQL-HASHFUNCTION*</code>
+  <a id="eql-hashfunction" class="indexterm"></a></em></strong> is used
+ instead; this value must be one of <code class="constant">EXT:FASTHASH-EQL</code>,
  <code class="constant">EXT:STABLEHASH-EQL</code>.
- Similarly, when the symbol <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a> or the function <code class="literal">#'equal</code>
+ Similarly, when the symbol <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a> or the function <code class="literal">#'equal</code>
  is used as a <code class="constant">:TEST</code> argument, the value of the variable
- <code class="varname">CUSTOM:*EQUAL-HASHFUNCTION*</code> is used instead;
- this value must be one of <code class="constant">EXT:FASTHASH-EQUAL</code>,
+ <strong class="first"><em class="firstterm"><code class="varname">CUSTOM:*EQUAL-HASHFUNCTION*</code>
+  <a id="equal-hashfunction" class="indexterm"></a></em></strong> is used
+ instead; this value must be one of <code class="constant">EXT:FASTHASH-EQUAL</code>,
  <code class="constant">EXT:STABLEHASH-EQUAL</code>.</p><p>The <code class="constant">:WARN-IF-NEEDS-REHASH-AFTER-GC</code> argument,
-if true, causes a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> to be <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed when an object is stored
+if true, causes a <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> to be <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed when an object is stored
 into the table which will force table reorganizations at the first
 access of the table after each <a href="gc.html" class="olink">garbage-collect</a>ion.
 This keyword argument can be used to check whether <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>
 should be preferred over <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a> for a particular table.
 Use <code class="function">HASH-TABLE-WARN-IF-NEEDS-REHASH-AFTER-GC</code>
-to check and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> this parameter after the table has been created.</p><p>The <code class="constant">:INITIAL-CONTENTS</code> argument is an
- <a class="" href="http://www.lisp.org/HyperSpec/Body/glo_a.html#association_list">association list</a> that is used to initialize the new hash table.</p><p>The <code class="constant">:REHASH-THRESHOLD</code> argument is ignored.</p><p>The <code class="constant">:WEAK</code> argument can take the following values:
- </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a> (default)</td></tr><tr><td><code class="constant">:KEY</code></td></tr><tr><td><code class="constant">:VALUE</code></td></tr><tr><td><code class="constant">:KEY-AND-VALUE</code></td></tr><tr><td><code class="constant">:KEY-OR-VALUE</code></td></tr></table><p>
-and specifies whether the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a> is <span class="emphasis"><em>weak</em></span>:
+to check and <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> this parameter after the table has been created.</p><p>The <code class="constant">:INITIAL-CONTENTS</code> argument is an
+ <a class="" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/glo_a.html#association_list">association list</a> that is used to initialize the new hash table.</p><p>The <code class="constant">:REHASH-THRESHOLD</code> argument is ignored.</p><p>The <code class="constant">:WEAK</code> argument can take the following values:
+ </p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a> (default)</td></tr><tr><td><code class="constant">:KEY</code></td></tr><tr><td><code class="constant">:VALUE</code></td></tr><tr><td><code class="constant">:KEY-AND-VALUE</code></td></tr><tr><td><code class="constant">:KEY-OR-VALUE</code></td></tr></table><p>
+and specifies whether the <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a> is <span class="emphasis"><em>weak</em></span>:
 if the key, value, either or both are not accessible for the <a href="gc.html" class="olink">garbage-collect</a>ion
-purposes, i.e., if they are only accessible via weak <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s
+purposes, i.e., if they are only accessible via weak <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s
 and <a class="link" href="weak.html#weak-pointer" title="31.7.1. Weak Pointers"><code class="classname">EXT:WEAK-POINTER</code></a>s, it is <a href="gc.html" class="olink">garbage-collect</a>ed and removed from the weak
-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>.</p><p>The <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>able predicate <code class="function">EXT:HASH-TABLE-WEAK-P</code>
-checks whether the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a> is weak.</p><p>Note that the only test that makes sense for weak hash tables are
-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> and its variants <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a> and <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>.</p><p>Just like all other <a class="link" href="weak.html" title="31.7. Weak Objects">weak objects</a>, weak
-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s cannot be printed readably.</p><p>See also <a class="xref" href="weak.html#weak-ht" title="31.7.9. Weak Hash Tables">Section 31.7.9, “Weak Hash Tables”</a>.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="hashtable-gc-rehash"></a>18.2.1. Interaction between <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s and <a href="gc.html" class="olink">garbage-collect</a>ion</h3></div></div></div><p>When a hash table contains keys to be compared by identity - such
- as <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_number.html" target="_top"><code class="classname">NUMBER</code></a>s in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s with the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_hash-table-test.html" target="_top"><code class="function">HASH-TABLE-TEST</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>;
- or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_cons.html" target="_top"><code class="classname">CONS</code></a>es in tables which test with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a>;
- or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_vector.html" target="_top"><code class="classname">VECTOR</code></a>s in tables which test with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a>;
- or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_standard-object.html" target="_top"><code class="classname">STANDARD-OBJECT</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a> instances in tables which
- test with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equalp.html" target="_top"><code class="function">EQUALP</code></a>;
+<a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>.</p><p>The <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>able predicate <code class="function">EXT:HASH-TABLE-WEAK-P</code>
+checks whether the <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a> is weak.</p><p>Note that the only test that makes sense for weak hash tables are
+<a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> and its variants <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:FASTHASH-EQ</code></a> and <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="constant">EXT:STABLEHASH-EQ</code></a>.</p><p>Just like all other <a class="link" href="weak.html" title="31.7. Weak Objects">weak objects</a>, weak
+<a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s cannot be printed readably.</p><p>See also <a class="xref" href="weak.html#weak-ht" title="31.7.9. Weak Hash Tables">Section 31.7.9, “Weak Hash Tables”</a>.</p><div class="section" title="18.2.1. Interaction between HASH-TABLEs and garbage-collection"><div class="titlepage"><div><div><h3 class="title"><a id="hashtable-gc-rehash"></a>18.2.1. Interaction between <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s and <a href="gc.html" class="olink">garbage-collect</a>ion</h3></div></div></div><p>When a hash table contains keys to be compared by identity - such
+ as <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_number.html" target="_top"><code class="classname">NUMBER</code></a>s in <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s with the <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_hash-table-test.html" target="_top"><code class="function">HASH-TABLE-TEST</code></a> <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>;
+ or <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_cons.html" target="_top"><code class="classname">CONS</code></a>es in tables which test with <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> or <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a>;
+ or <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_vector.html" target="_top"><code class="classname">VECTOR</code></a>s in tables which test with <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>, <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> or <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a>;
+ or <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/cla_standard-object.html" target="_top"><code class="classname">STANDARD-OBJECT</code></a> or <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a> instances in tables which
+ test with <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>, <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a>, <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a> or <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_equalp.html" target="_top"><code class="function">EQUALP</code></a>;
  - the hash code will in general depend on the object's address in
  memory.  Therefore it will in general be invalidated after a <a href="gc.html" class="olink">garbage-collect</a>ion,
  and the hash table's internal structure must be recomputed at the next
  table access.</p><p>While <code class="constant">:WARN-IF-NEEDS-REHASH-AFTER-GC</code> can help
- checking the efficiency of a particular <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>, the variable
+ checking the efficiency of a particular <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>, the variable
 <strong class="first"><em class="firstterm"><a class="link" href="make-hash.html#hashtable-gc-rehash-warn"><code class="varname">CUSTOM:*WARN-ON-HASHTABLE-NEEDING-REHASH-AFTER-GC*</code></a>
  <a id="hashtable-gc-rehash-warn" class="indexterm"></a></em></strong>
- achieves the same effect for all <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s in the system at once:
+ achieves the same effect for all <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>s in the system at once:
  when <a class="link" href="make-hash.html#hashtable-gc-rehash-warn"><code class="varname">CUSTOM:*WARN-ON-HASHTABLE-NEEDING-REHASH-AFTER-GC*</code></a> is true and a
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a> needs to be rehashed after a <a href="gc.html" class="olink">garbage-collect</a>ion, a warning is
- issued that shows the inefficient <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>.</p><p>What can be done to avoid the inefficiencies detected by these warnings?
- </p><div class="orderedlist"><ol type="1"><li>In many cases you can solve the problem
+ <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a> needs to be rehashed after a <a href="gc.html" class="olink">garbage-collect</a>ion, a warning is
+ issued that shows the inefficient <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>.</p><p>What can be done to avoid the inefficiencies detected by these warnings?
+ </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">In many cases you can solve the problem
     by using the <code class="function">STABLEHASH</code> variant of the hash
-    test.</li><li>In other cases, namely <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_standard-object.html" target="_top"><code class="classname">STANDARD-OBJECT</code></a> or
-    <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a> instances, you can solve the problem by making
+    test.</li><li class="listitem">In other cases, namely <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/cla_standard-object.html" target="_top"><code class="classname">STANDARD-OBJECT</code></a> or
+    <a class="ulink" href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a> instances, you can solve the problem by making
     the key object classes inherit from <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STANDARD-STABLEHASH</code></a> or
-    <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STRUCTURE-STABLEHASH</code></a>, respectively.</li><li>In the remaining cases, you should store a hash key
+    <a class="link" href="make-hash.html" title="18.2. Function MAKE-HASH-TABLE"><code class="classname">EXT:STRUCTURE-STABLEHASH</code></a>, respectively.</li><li class="listitem">In the remaining cases, you should store a hash key
     inside the object, of which you can guarantee uniqueness through
     your application (for example the ID of an object in a database, or
     the serial number of an object), and use this key as hash key
-    instead of the original object.</li></ol></div></div></div><div class="bookinfo"><hr /><table width="100%" summary="impnotes meta info"><th><td align="left">These notes document <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> version 2.47</td><td align="right">Last modified: 2008-10-23</td></th></table></div><div class="custom-footer"><hr /><table width="100%"><tr><td align="left"><a href="http://clisp.cons.org"><img src="clisp.png" width="48" height="48" alt="[CLISP home]" /></a></td><td align="center"><a href="https://sourceforge.net/donate/index.php?group_id=1355"><img src="http://images.sourceforge.net/images/project-support.jpg" width="88" height="32" alt="[Support CLISP]" /></a></td><td align="right"><a href="https://sourceforge.net"><img width="125" height="37" alt="[SourceForge]" src="http://sflogo.sourceforge.net/sflogo.php?group_id=1355&amp;type=2&amp;page=make-hash" /></a></td></tr></table></div><hr /><form method="get" action="http://www.google.com/custom" target="_top"><table width="100%" border="0"><tr><td nowrap="nowrap" align="center"><input type="hidden" name="domains" value="clisp.cons.org;clisp.podval.org;www.lisp.org" /><label for="sbi" style="display: none">Enter your search terms</label><input type="text" name="q" size="50" maxlength="255" id="sbi" value="18.2. Function MAKE-HASH-TABLE" /><label for="sbb" style="display: none">Submit search form</label><input type="submit" name="sa" value="Google Search" id="sbb" /></td></tr><tr><td nowrap="nowrap" align="center"><input type="radio" name="sitesearch" value="" checked="1" id="ss0" /><label for="ss0" title="Search the Web"><small>Web</small></label><input type="radio" name="sitesearch" value="clisp.cons.org" id="ss1" /><label for="ss1" title="Search clisp.cons.org"><small>clisp.cons.org</small></label><input type="radio" name="sitesearch" value="clisp.podval.org" id="ss2" /><label for="ss2" title="Search clisp.podval.org"><small>clisp.podval.org</small></label><input type="radio" name="sitesearch" value="www.lisp.org" id="ss3" /><label for="ss3" title="Search www.lisp.org"><small>www.lisp.org</small></label><input type="hidden" name="client" value="pub-4445255502750357" /><input type="hidden" name="forid" value="1" /><input type="hidden" name="ie" value="UTF-8" /><input type="hidden" name="oe" value="UTF-8" /><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:000000;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:48;LW:48;L:http://clisp.cons.org/clisp.png;S:http://clisp.cons.org;FORID:1" /><input type="hidden" name="hl" value="en" /></td></tr></table></form><hr /><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="hash-mod-key.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="hash.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="defhash.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">18.1. Modifying Hash Table Keys
-   </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 18.3. Macro <code class="function">EXT:DEFINE-HASH-TABLE-TEST</code></td></tr></table></div></body></html>
+    instead of the original object.</li></ol></div></div></div><div class="bookinfo"><hr /><table width="100%" summary="impnotes meta info"><th><td align="left">These notes document <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> version 2.48</td><td align="right">Last modified: 2009-07-28</td></th></table></div><div class="custom-footer"><hr /><table width="100%"><tr><td align="left"><a href="http://clisp.cons.org"><img src="clisp.png" width="48" height="48" alt="[CLISP home]" /></a></td><td align="center"><a href="https://sourceforge.net/donate/index.php?group_id=1355"><img src="http://images.sourceforge.net/images/project-support.jpg" width="88" height="32" alt="[Support CLISP]" /></a></td><td align="right"><a href="https://sourceforge.net/projects/clisp"><img width="120" height="30" alt="[SourceForge]" src="http://sflogo.sourceforge.net/sflogo.php?group_id=1355&amp;type=12&amp;page=make-hash" /></a></td></tr></table></div><hr /><form method="get" action="http://www.google.com/custom" target="_top"><table width="100%" border="0"><tr><td nowrap="nowrap" align="center"><input type="hidden" name="domains" value="clisp.cons.org;clisp.podval.org;www.lisp.org" /><label for="sbi" style="display: none">Enter your search terms</label><input type="text" name="q" size="50" maxlength="255" id="sbi" value="18.2. Function MAKE-HASH-TABLE" /><label for="sbb" style="display: none">Submit search form</label><input type="submit" name="sa" value="Google Search" id="sbb" /></td></tr><tr><td nowrap="nowrap" align="center"><input type="radio" name="sitesearch" value="" checked="1" id="ss0" /><label for="ss0" title="Search the Web"><small>Web</small></label><input type="radio" name="sitesearch" value="clisp.cons.org" id="ss1" /><label for="ss1" title="Search clisp.cons.org"><small>clisp.cons.org</small></label><input type="radio" name="sitesearch" value="clisp.podval.org" id="ss2" /><label for="ss2" title="Search clisp.podval.org"><small>clisp.podval.org</small></label><input type="radio" name="sitesearch" value="www.lisp.org" id="ss3" /><label for="ss3" title="Search www.lisp.org"><small>www.lisp.org</small></label><input type="hidden" name="client" value="pub-4445255502750357" /><input type="hidden" name="forid" value="1" /><input type="hidden" name="ie" value="UTF-8" /><input type="hidden" name="oe" value="UTF-8" /><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:000000;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:48;LW:48;L:http://clisp.cons.org/clisp.png;S:http://clisp.cons.org;FORID:1" /><input type="hidden" name="hl" value="en" /></td></tr></table></form><hr /><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="hash-mod-key.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="hash.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="defhash.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">18.1. Modifying Hash Table Keys    </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 18.3. Macro <code class="function">EXT:DEFINE-HASH-TABLE-TEST</code></td></tr></table></div></body></html>