Ratio Compiling/Classifying methods

Alexandre Bergel bergel at iam.unibe.ch
Mon Apr 26 10:28:36 UTC 2004


Hi Ned,

I am really puzzled. I execute the following:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SystemChangeNotifier uniqueInstance doSilently: [
t1 := Time millisecondsToRun: [1 to: 600 do: [:i| Object compile: 'bar', i printString, ' 1 + 2 + 3 + 4 + 5. ^ 100 factorial']].
Transcript show: 'Time to compile 600 methods: ', t1 printString; cr.

t2 := Time millisecondsToRun: [1 to: 600 do: [:i| Object organization classify: (#bar , i printString) asSymbol under: #'dummy-test']].
Transcript show: 'Time to classify 600 methods: ', t2 printString; cr]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

and I have:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Time to compile 600 methods: 17469
Time to classify 600 methods: 17307
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

On a fresh 5878 image. Monticello is not so involved.
However, executing twice the code in a row does not give twice the same result (because of some optimization). So now I get stuck with my binary loader...

Cheers,
Alexandre


On Sun, Apr 25, 2004 at 11:06:17AM -0700, Ned Konz wrote:
> On Sunday 25 April 2004 4:41 am, Alexandre Bergel wrote:
> > t1 := Time millisecondsToRun: [1 to: 600 do: [:i| Object compile: 'bar', i
> > printString, ' 1 + 2 + 3 + 4 + 5. ^ 100 factorial']]. Transcript show:
> > 'Time to compile 600 methods: ', t1 printString; cr.
> 
> Time to compile 600 methods: 48622
> Time to classify 600 methods: 270
> 
> It looks like you could save 80% of the time by not having Monticello loaded.
> 
> Try:
> 
> TimeProfileBrowser onBlock: [ [1 to: 600 do: [:i| Object organization classify: (#bar , i printString) asSymbol under: #'dummy-test']] ]
> 
> 
>  - 39292 tallies, 39344 msec.
> 
> **Tree**
> 98.8% {38872ms} ClassOrganizer>>classify:under:
>   98.8% {38872ms} ClassOrganizer>>classify:under:suppressIfDefault:
>     86.9% {34190ms} SystemChangeNotifier>>selector:recategorizedFrom:to:inClass:
>       |86.9% {34190ms} SystemChangeNotifier>>trigger:
>       |  86.9% {34190ms} RecategorizedEvent(AbstractEvent)>>trigger:
>       |    86.9% {34190ms} SystemEventManager(Object)>>triggerEvent:with:
>       |      86.9% {34190ms} SystemEventManager(Object)>>triggerEvent:withArguments:
>       |        86.9% {34190ms} WeakActionSequenceTrappingErrors>>valueWithArguments:
>       |          86.9% {34190ms} WeakActionSequenceTrappingErrors>>valueWithArgum...startingFrom:
>       |            82.6% {32498ms} WeakMessageSend>>valueWithArguments:
>       |              |80.3% {31593ms} MCWorkingCopy(MCPackageManager)>>methodMoved:
>       |              |  |47.5% {18688ms} PackageInfo>>includesMethod:ofClass:
>       |              |  |  |33.2% {13062ms} PackageInfo>>includesMethodCategory:ofClass:
>       |              |  |  |  |27.1% {10662ms} PackageInfo>>includesClass:
>       |              |  |  |  |  |27.1% {10662ms} Object class(ClassDescription)>>category
>       |              |  |  |  |  |  27.1% {10662ms} SystemOrganizer(ClassOrganizer)>>categoryOfElement:
>       |              |  |  |  |  |    27.1% {10662ms} SystemOrganizer(ClassOrganizer)>>numberOfCategoryOfElement:
>       |              |  |  |  |6.1% {2400ms} PackageInfo>>isYourClassExtension:
>       |              |  |  |  |  6.0% {2361ms} PackageInfo>>category:matches:
>       |              |  |  |  |    5.5% {2164ms} String(SequenceableCollection)>>,
>       |              |  |  |  |      5.5% {2164ms} String(SequenceableCollection)>>copyReplaceFrom:to:with:
>       |              |  |  |14.3% {5626ms} ClassOrganizer>>categoryOfElement:
>       |              |  |  |  14.3% {5626ms} ClassOrganizer>>numberOfCategoryOfElement:
>       |              |  |32.5% {12787ms} PackageInfo>>includesMethodCategory:ofClass:
>       |              |  |  23.0% {9049ms} PackageInfo>>includesClass:
>       |              |  |    |18.0% {7082ms} Object class(ClassDescription)>>category
>       |              |  |    |  |18.0% {7082ms} SystemOrganizer(ClassOrganizer)>>categoryOfElement:
>       |              |  |    |  |  18.0% {7082ms} SystemOrganizer(ClassOrganizer)>>numberOfCategoryOfElement:
>       |              |  |    |5.0% {1967ms} PackageInfo>>includesSystemCategory:
>       |              |  |    |  5.0% {1967ms} PackageInfo>>category:matches:
>       |              |  |    |    5.0% {1967ms} String(SequenceableCollection)>>,
>       |              |  |    |      5.0% {1967ms} String(SequenceableCollection)>>copyReplaceFrom:to:with:
>       |              |  |  9.6% {3777ms} PackageInfo>>isYourClassExtension:
>       |              |  |    6.0% {2361ms} PackageInfo>>category:matches:
>       |              |  |      |5.6% {2203ms} String(SequenceableCollection)>>,
>       |              |  |      |  5.6% {2203ms} String(SequenceableCollection)>>copyReplaceFrom:to:with:
>       |              |  |    3.6% {1416ms} Symbol(String)>>asLowercase
>       |              |  |      3.6% {1416ms} Symbol>>asString
>       |              |2.3% {905ms} WeakMessageSend>>collectArguments:
>       |              |  2.3% {905ms} primitives
>       |            3.7% {1456ms} Halt class(Exception class)>>,
>       |              3.7% {1456ms} ExceptionSet class(Behavior)>>new
>       |                3.4% {1338ms} ExceptionSet>>initialize
>       |                  3.4% {1338ms} OrderedCollection class>>new
>       |                    3.4% {1338ms} OrderedCollection class>>new:
>     5.3% {2085ms} ClassOrganizer>>removeElement:
>       |4.3% {1692ms} WriteStream>>nextPut:
>     5.3% {2085ms} SystemNavigation>>allBehaviorsDo:
>       5.3% {2085ms} ProtoObject class(Behavior)>>allSubclassesDoGently:
>         5.3% {2085ms} Object class(Behavior)>>allSubclassesDoGently:
>           5.3% {2085ms} Morph class(Behavior)>>allSubclassesDoGently:
>             5.3% {2085ms} BorderedMorph class(Behavior)>>allSubclassesDoGently:
>               5.3% {2085ms} RectangleMorph class(Behavior)>>allSubclassesDoGently:
>                 5.3% {2085ms} ThumbnailMorph class(Behavior)>>allSubclassesDoGently:
>                   5.2% {2046ms} Metaclass(Behavior)>>allSubclassesDoGently:
>                     5.2% {2046ms} Metaclass(Behavior)>>allSubclassesDoGently:
>                       5.2% {2046ms} Metaclass(Behavior)>>allSubclassesDoGently:
>                         5.2% {2046ms} Metaclass(Behavior)>>allSubclassesDoGently:
>                           5.2% {2046ms} Metaclass>>subclassesDoGently:
>                             5.2% {2046ms} MethodWithInterface class(Class)>>subclassesDo:
>                               5.2% {2046ms} Array(SequenceableCollection)>>do:
>  
> **Leaves**
> 59.4% {23370ms} SystemOrganizer(ClassOrganizer)>>numberOfCategoryOfElement:
> 17.3% {6807ms} String(SequenceableCollection)>>copyReplaceFrom:to:with:
> 5.3% {2085ms} Array(SequenceableCollection)>>do:
> 4.3% {1692ms} WriteStream>>nextPut:
> 3.6% {1416ms} Symbol>>asString
> 2.3% {905ms} WeakMessageSend>>collectArguments:
> 2.1% {826ms} OrderedCollection class(Behavior)>>new
> 
> **Memory**
> 	old			+0 bytes
> 	young		+10,580 bytes
> 	used		+10,580 bytes
> 	free		-10,580 bytes
> 
> **GCs**
> 	full			0 totalling 0ms (0.0% uptime)
> 	incr		2168 totalling 1,810ms (5.0% uptime), avg 1.0ms
> 	tenures		0
> 	root table	0 overflows
> 
> -- 
> Ned Konz
> http://bike-nomad.com
> GPG key ID: BEEA7EFE

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.iam.unibe.ch/~bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



More information about the Squeak-dev mailing list