[BUG] Unscalability in collections.

Scott A Crosby crosby at qwes.math.cmu.edu
Tue Oct 9 16:27:18 UTC 2001


On Mon, 8 Oct 2001, Lex Spoon wrote:

>
> Hmmmm.  An alternative is to add a new method like #hashBits to query
> the VM, and then for #identityHash to do the scaling up.  This would let
> IdentitySet also benefit from the change.
>
> To rehash everything, you can do:
>
> 	Smalltalk allObjectsDo: [ :o | o rehash ]

Been there, tried it. doesn't work. I refactored out
ProtoObject>>hashBits, made method dictionaries use that. This works; no
problem. Assume that I've already done that in my remarks below.

I could then make Object>>hash defined as being 'self hashBits * 4097'.
The image will go to the emergency evaluator after 'a little bit' (5-20
seconds). Untested, but that should be enough time to rehash all sets.

But, thats still a workaround; I want a fix thats complete, so I don't do
that. The right fix is what ou suggest, alter ProtoObject>>identityHash.

I want to make ProtoObjct>>identityHash to be 'self hashBits * 4097'. If I
do this, the image just exits; no walkback, no emergency evaluator. I
suspect this may be partially because the symbol table, for example,
becomes immediately useless.

Any suggestion? And, how to make a changeset with this change.

(Once I figure out the above, I will then make a seperate primitives in
the interpreter for hashing.)

>
> So am I missing anything?  I'd say go for it!
>

Yep; try it. It don't want to work. :)


Scott



--
No DVD movie will ever enter the public domain, nor will any CD. The last CD
and the last DVD will have moldered away decades before they leave copyright.
This is not encouraging the creation of knowledge in the public domain.





More information about the Squeak-dev mailing list