HashBits, a lazy way

Hannes Hirzel hannes.hirzel.squeaklist at bluewin.ch
Wed Jul 9 11:58:36 UTC 2003


Hi John

The things you write, are interesting, but I do not get the point which 
topic you are writing about. Which kind of problem are you thinking of
solving? It seems to have something to do with generating the internal
id each object has. What is wrong with the current solution and which
kind of enhancement are you thinking of?

Thanks for clarification in advance.

Regards

Hannes Hirzel

John M McIntosh wrote:
>> 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...
> 





More information about the Squeak-dev mailing list