Demystifying "most Smalltalk's don't directly support multiple inheritance"

Klaus D. Witzel klaus.witzel at cobss.com
Fri Jun 23 04:31:33 UTC 2006


Hi Edgar,

on Fri, 23 Jun 2006 01:14:20 +0200, you wrote:
> Klaus D. Witzel puso en su mail :
>> -------
>>
>> I would be very interested to see if my examples run on other platforms
>> and VMs, please post your experience. Thank you.
>>
>> It'd be equally interesting if the approach had been used before.
>>
>> /Klaus
>> ?
>>
>
> DoIt: " MessageTally spyOn: [ | aCupWith |
>         aCupWith := CaffeeWithMilk newLatteMacchiato.
>         10000 timesRepeat: [aCupWith veryMuchSugar]] "
>
> Here I got on Mac
>
>  1267 tallies, 1273 msec.
>
> **Tree**
> 99.8% {1270ms} CaffeeWithMilk>>veryMuchSugar
>   47.0% {598ms} CaffeeWithMilk>>DoIt
>     |46.7% {594ms} ProcessorScheduler>>nextReadyProcess

That output is from a non 3.9 image. On a 3.9 image you would see that the  
debugger benefits from the implementation of traits, it has better means  
for finding out which class and selector a method is actually used at  
run-time. Here's the difference:

- 1132 tallies, 1132 msec.

**Tree**
97.9% {1108ms} CaffeeWithMilk>>veryMuchSugar
   52.9% {599ms} CaffeeWithMilk(SugarService)>>sugar
     |52.7% {597ms} ProcessorScheduler>>nextReadyProcess
>
> But your code deserve more deep study, and I thanks for it.

You are welcome :)

/Klaus




More information about the Squeak-dev mailing list