[Openmcl-devel] Hash Table performance

Osei Poku osei.poku at gmail.com
Tue Sep 23 14:58:29 PDT 2008


Hi,

CCL extensively uses the ENUMERATE-HASH-KEYS-AND-VALUES function  
underneath most of hash table functions (MAPHASH, WITH-HASH-TABLE- 
ITERATOR).  This causes a great deal of waste when iterating through a  
very large hash table (like I have now ~10^8 entries).  The way I  
understand the code from briefly looking at l0-hash.lisp and  
hash.lisp, the contents of the hash table are first stored in a pair  
of vectors, then the vectors are iterated through.

WITH-HASH-TABLE-ITERATOR is used everywhere like in the expansion of  
the LOOP macro.  There is simply no standard way in CCL to iterate  
through the contents of a hash table without doing this double work.   
Is there some fundamental limitation of the way hash tables are  
implemented in CCL that prevent iterating through its contents only  
once?

Osei



More information about the Openmcl-devel mailing list