HashBits, a lazy way

John M McIntosh johnmci at smalltalkconsulting.com
Wed Jul 9 05:38:10 UTC 2003


> The solution of course is to do it with lazy initialization, only when
> someone actually needs to use it do we
> build the hash number just for them.
>
> Right now I'm digging about to see what up,

Sigh, the first issue is that
newObjectHash
	"Answer a new 16-bit pseudo-random number for use as an identity hash."

	lastHash _ 13849 + (27181 * lastHash) bitAnd: 65535.
	^ lastHash

in the past used all 12 bits, so across the entire set of objects in  
the system, we've used all the bits.
Thus I've no trigger (say 0? or '16rFFF') to decide if to generate a  
hash value... Sigh.

Anyone have some great idea to get beyond this?  I guess one could  
rehash everything, but then
we would need to tie that to a VM, and what about image segments?  
Sigh...

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===



More information about the Squeak-dev mailing list