[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What have hashing and equality to do with each other?

There has been some discussion of hashing algorithms spawned by the
assertion that (= (compute-hash-index-for a) (compute-hash-index-for b))
is a sufficient definition of (equal a b).  Nobody has said so, but "it
ain't so!"

The point of hashing is to map a large, sparse space into a smaller
(hopefully more) dense one.  Once you compute a hash index you have to
peek into the table and look for a collision (what you do then is up to

What's this rumour I heard about the CLOS people having defined EQUAL as
a generic function....