[SqF]Report of VI4 Project for Feb '02

Scott A Crosby crosby at qwes.math.cmu.edu
Sat Feb 2 02:42:20 UTC 2002


On Fri, 1 Feb 2002, Martin McClure wrote:

> At 3:15 PM -0800 2/1/02, Tim Rowledge wrote:
> >This is the initial report for the VI4 Project group.
> >
> >Goal: This project is intended to gather together all the vm and vi
> >related changes that have been proposed and which require a different
> >image format.
>
> One more possible change: It was brought up a few months back that
> the number of object header bits devoted to identity hash (10 or 11
> bits, IIRC) wasn't enough to allow efficient hashed identity
> collections that were very large. It would be nice to have more bits

No, those bits are misued. In essence, large collections ignore them
entirely. If they are used, the Identity** collections can scale to tens
of thousands or more elements without a severe degradation. (Basically,
using Identity* will be 4000x faster than a linear scan.)

Performance degradation will continue to occur, but I push the limit from
10,000 to 500,000-2,000,000.

> Also, as was discussed back then, it would improve things to make the
> identity hash reported by the VM have a larger range than 0-1023,
> even if it can only have 1024 different values. I think I proposed
> multiplying the current value by 65537, a prime number of roughly the
> right magnitude. This wouldn't require an image format change as
> such, but it would require rehashing all existing hashed identity

Correct, my patch does that. There's a small potential robustness problem
in a particular edge case, but it works. New primitives should be made
though to do the multiplication in software.

> collections, including method dictionaries. (I haven't rechecked my
> facts, this is all from memory, so please correct me if I've got any
> of the details wrong.)

No, I preserve the old (flawed) behavior for method dictionaries, rather
than rebuilding a new image. True, this means that MethodDictionaries
should not be scaled beyond, say, 2000 or so methods. I don't consider
this a real problem.

Scott




More information about the Squeak-dev mailing list