Performance profiling results...

Andreas Raab Andreas.Raab at gmx.de
Sun Sep 23 05:42:38 UTC 2001


Stephane,

> If I understand well
>
> a := b := self send.
>
> is more expensive than
>
> a := self send.
> b := a
>
> Is it right?

Ah ... well. It depends. When you're running the code in Smalltalk there's
effectively no difference whatsoever. However, in this particular case we
were talking about code that is translated into C. And the translator has a
number of (quite complex) rules. One of them is that in order to inline a
send it must result in a simple assignment. This is not true in the "a := b
:= ..." case. Therefore the send was not inlined by the Slang->C translator.
And that is what showed up in the profiling results.

Cheers,
  - Andreas





More information about the Squeak-dev mailing list