I’m trying to implement some data structures (like HAMP-hash array mapped trie) in Common Lisp and I need to get 32- or 64-bit hashes of objects which I want to store in these data structures.
I know I can put objects into Common Lisp hash tables (created with (make-hash-table)), but I couldn’t find a way to get a hash of an object, like hashCode of Java or hash of Python. Does Common Lisp have a function like that? If doesn’t, how does CL’s standard hash table generate hashes from arbitrary types of objects?
The function
sxhashreturns a hash for its argument. Details: sxhash.