23 Sep 23:56
Hash Table performance
From: Osei Poku <osei.poku <at> gmail.com>
Subject: Hash Table performance
Newsgroups: gmane.lisp.openmcl.devel
Date: 2008-09-23 21:58:29 GMT
Subject: Hash Table performance
Newsgroups: gmane.lisp.openmcl.devel
Date: 2008-09-23 21:58:29 GMT
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
RSS Feed