[squeak-dev] The Inbox: ST80-ct.256.mcz
leves at caesar.elte.hu
Sat Jun 13 22:26:50 UTC 2020
On Sat, 13 Jun 2020, Nicolas Cellier wrote:
> Hi Subbu,
> the or:/and:
> are inlined, so there is no block activated, just conditional jump byte codes like ifTrue:/ifFalse:
> | and & cost a message send. It would be interesting to study how sista inlining deals with it...
#| and #& will be slower even with inlining because they are the
non-short-circuit variants of #or: and #and:.
> Le sam. 13 juin 2020 à 13:58, K K Subbu <kksubbu.ml at gmail.com> a écrit :
> On 12/06/20 11:18 pm, Thiede, Christoph wrote:
> > Marcel explicitly asked for duplicating these lines. However, one
> > single condition would not be bad either, but why would you use #|
> > instead of #or: here? Is this just in order to save one pair of
> > brackets? ;-)
> It is an simple boolean expression that can be evaluated in a single
> sequence of bytecodes.
> If the first part of the or: is false, then a block has to be activated
> and evaluated for the result. If the block involves significant
> computation then the overhead may not matter much. For simple
> expressions, it is an overkill.
> Regards .. Subbu
More information about the Squeak-dev