[Magma] performance (was: test result)
Stephen Pair
spair at acm.org
Tue Aug 6 14:34:53 UTC 2002
Andreas wrote:
> Stephen,
>
> > You may not be hitting the IdDict scaling wall in the 30
> second test.
>
> There is no IDdict scaling wall here - the tallies show that
> WeakValueDictionary is used which does not use identity (but rather
> equality) on its keys. Therfore the only scaling issue that
> could come up would be LargeInts #hash value and making this
> spread more is trivial.
Ah...right. I didn't even notice that. In the short test, the
id->object map is the bottleneck (rather than the object->id map or the
object->object change tracking dictionary).
> > To make the 30 second test faster, I would figure out ways
> of reducing
> > the number of calls to the LargeInteger comparison.
>
> For example by using IDDicts?! ;-)))
Except that wouldn't work for LargeInteger keys. If you used an IdDict,
you would need some way of canonicalizing the oids...which still means
using the LargeInteger comparison in this case.
I would start by trying trying to minimize the additions and removals if
possible. Then, I might consider using something other than
LargeIntegers as keys (would ByteArrays offer a faster
comparison?...there aren't any tests (like smallness, negativeness, etc)
involved in comparing ByteArrays). Finally, I would think about going
one step further and reify the oid itself and canonicalize those into a
WeakSet (similar to Symbols). I would make the oid hold its target
directly (eliminating the need for a Dictionary to map oid->object).
Then, I could figure out ways to make the other two IdDict's
(object->oid and object->old_object) scale better.
- Stephen
More information about the Squeak-dev
mailing list
|