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

Stephen Pair spair at acm.org
Sun Aug 4 20:03:45 UTC 2002


Could we make all really small hashed structures do linear searches?

- Stephen

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Ned Konz
> Sent: None
> To: squeak-dev at lists.squeakfoundation.org
> Subject: [ENH] Ten Percent Faster Morphic! (with conversion)
> 
> 
> OK, I added conversion methods for backwards- and forwards- 
> compatibility.
> 
> from preamble:
> 
> "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 extensions. 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 key/value sequences.
> 
> 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 IdentityDictionaries.
> 
> 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 set. "!
> 




More information about the Squeak-dev mailing list