Thue-Morse and performance: Squeak v.s. Strongtalk v.s.
VisualWorks
Andreas Raab
andreas.raab at gmx.de
Sun Dec 17 12:51:53 UTC 2006
Klaus D. Witzel wrote:
> O.K. I understand that as lack of use case. Take this (take that ;-)
>
> | allCs |
> allCs := Smalltalk allClasses.
> "start timing here"
> 1 to: allCs size do: [:i | (allCs at: i) methodDict "just access the
> iVar"]
> "note that #yourself from the previous example is now just #methodDict"
>
> This snippet is performed on behalf of every developer who asks for
> senders and/or implementors. It is, IMHO, the most often used piece of
> code of every Smalltalk, ever.
Absolutely not. Your claim that "this snippet is performed on behalf of
every developer who asks for senders and/or implementors" is misleading.
This is not what is *actually* performed. What is actually done is a lot
more. For every single mega-morphic send you have dozens of mono-morphic
sends.
That is my whole point. Just like in your previous post, you are not
using actual code but rather a specifically devised micro-benchmark that
has none of the characteristics of actual code. It's not done sending
#methodDict - this is when the work starts not when it ends. If you look
at the actual code that is executed, say:
MessageTally tallySends:[Time browseAllCallsOn: #yourself]
you will find that when browsing senders there are some 50 messages sent
in addition to the single mega-morphic send and it is *those* fifty
messages are where the real work is - the single mega-morphic send is
simply noise in the overall performance. And it's these fifty messages
(which have different performance characteristics) where Strongtalk just
completely rulez.
> But, even for the latter I expect to find the = in >= when Strongtalk
> "...executes Smalltalk much faster than any other Smalltalk
> implementation...".
The claim is about "Smalltalk code", not about "Klaus Witzel Benchmarks"
(the difference between the two should be obvious). I can always design
you a benchmark that makes a particular system look bad.
>> I would expect that you know how to evaluate the results of a
>> micro-benchmarks, and I would in particular expect that you know that
>> 80-90% of all call-sites in realistic code are mono-morphic to begin
>> with which render your benchmark results absolutely useless for
>> "Smalltalk code".
>
> Absolutely not (yes, I know about these figures. no, I disagree: see
> above).
If you know about the figures, then how can you claim that your
benchmark has any validity for general code? And as I am saying in the
above the *actual* code has "Smalltalk performance characteristics"
whereas your made-up micro-benchmark doesn't.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|