[ENH] Ten Percent Faster Morphic! (with conversion)
ned at bike-nomad.com
Sat Jan 28 03:57:01 UTC 2012
OK, I added conversion methods for backwards- and forwards-
"Change Set: FasterProperties-nk
Date: 3 August 2002
Author: Ned Konz
Currently, Morphs can have properties added and removed dynamically.
Their properties are stored in IdentityDictionaries in the Morph
These property dictionaries are typically very small (95% have 4 or less
entries; none has more than 8).
Because of this, using linear searches is considerably faster.
This change set modifies Morph to use MorphProperties instead of
IdentityDictionaries to hold properties. These use Arrays to hold
It will also work with old Morphs that use IdentityDictionaries; no
conversion of Projects, etc. is necessary. IdentityDictionaries will be
converted at project file-in (though unconverted ones work OK too); for
backwards compatibility, projects are written out using
The postscript will convert all existing property dictionaries in
MorphExtensions into OrderedCollections.
In two tests (Dan's browser opening tests and Andreas' menu opening
tests), I got 7% and 12.3% improvement (respectively) from this change
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4720 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120128/8a8f9f0f/FasterProperties-nk.cs.obj
More information about the Squeak-dev