Updated Hashing structure writ large (markdown)
parent
aa53f100bb
commit
4a6fb5273f
|
@ -133,7 +133,7 @@ Is this a good hash function? Probably not. A hash function should ideally distr
|
|||
|
||||
Certainly in Clojure practice, keys in hash maps are almost always 'keywords', a particular variety of string-like-thing. Nevertheless, Clojure, like Common Lisp (and many, perhaps all, other lisps) allows, in principal, that any value can be used as a key in a hash map.
|
||||
|
||||
The hash outlined above of using 32 bits of previously unused space in the string payload works because there were 32 unused bits in the string payload. While a hash function with similar properties can be imagined for cons cells, there are not currently any unused bits in a cons payload. To add a hash value would require adding more bits to every cons space object.
|
||||
The hack outlined above of using 32 bits of previously unused space in the string payload works because there were 32 unused bits in the string payload. While a hash function with similar properties can be imagined for cons cells, there are not currently any unused bits in a cons payload. To add a hash value would require adding more bits to every cons space object.
|
||||
|
||||
Our current cons space object is 256 bits:
|
||||
|
||||
|
|
Loading…
Reference in a new issue