[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MAKE-HASH-TABLE :TEST arg
Date: Mon, 12 Sep 88 07:18 EDT
From: "Steve Bacher (Batchman)" <SEB1525@draper.com>
From: CCFVX3::SEB1525 "Steve Bacher (Batchman)" 12-SEP-1988 07:15
To: IN%"jeff%aiai.edinburgh.ac.uk@nss.cs.ucl.ac.UK",SEB1525
Subj: RE: Re: Comparing functions
Er, my point was that MAKE-HASH-TABLE doesn't absolutely need to do that test.
Why can't a valid implementation of MAKE-HASH-TABLE just blindly FUNCALL the
TEST argument? If you can explain to me what different frobulations it needs
to set up based on the TEST argument, I will be convinced. Otherwise, I
remain.....
Various aspects of the behavior of a hash table are dependent upon the
TEST argument. An EQUAL hash table need not be rehashed after a copying
GC. The hash function is generally dependent upon the test function;
for an EQUAL hash table it would be SXHASH, while for an EQ hash table
it would probably be a simple hash on the address.
I suppose you COULD use SXHASH for all hash tables, since EQ objects are
necessarily EQUAL, and you COULD rehash ALL hash tables. Or you could
implement hash tables without actually hashing (e.g. implement them as
alists). But if performance is an issue (which it generally is when you
use a hash table), you'll probably want to do things dependent on the
test function.
barmar