Paul Brannan wrote:

> It seems to me that this would be much slower than the standard
> if/then/else/end, since so many method calls are involved.  In
> Smalltalk, it looks like only one method call, but it still looks like a
> method call.  How does Smalltalk make its ifTrue:/iFalse: work at a
> reasonable speed?
> 

Typical Smalltalk compilers inline a number of different methods. ifTrue: et 
al are typically the first ones to get inlined.

Squeak, for instance, inlines all these:

ifTrue:
ifFalse:
ifTrue:ifFalse:
ifFalse:ifTrue:
and:
or:
whileFalse:
whileTrue:
whileFalse
whileTrue
to:do:
to:by:do:
caseOf:
caseOf:otherwise:
ifNil:
ifNotNil:
ifNil:ifNotNil:
ifNotNil:ifNil: