[ENH] Ten Percent Faster Morphic! (with conversion)

Andreas Raab Andreas.Raab at gmx.de
Tue Aug 6 18:11:14 UTC 2002


Henrik,

> So I suggest that a much simpler solution/smaller change is 
> to instead add a primitive for scanFor:, to which you pass
> the hash value to use so you can use the same one also for
> regular dictionaries.

I don't like this idea too much. It would mean that implementing #key in
some association subclass (like WeakKeyAssociation) won't work any
longer (since your primitive would probably go directly to the key of
the association).

> It should be possible to
> refactor the code for the message lookup of the vm, in
> Interpreter>>#lookupMethodInDictionary: , into something like 
> lookupKey: key startingAt: index.

Method lookup relies on powers of two dictionaries (in order to avoid
division) so unless you change this you can't combine the two.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list