Some Self ideas

Stephan Rudlof sr at evolgo.de
Sun Jan 21 23:57:10 UTC 2001


Mark van Gulik wrote:
> 
<snipped>
> There *are* cases where treating 0 as
> false and 1 as true is efficient.  For example, max(a,b) can be defined as
> (a+(a>b)*(b-a)),

(a+(a<b)*(b-a))
     ^
is correct here.

Greetings,

Stephan

> which avoids branching (if your CPU & compiler can transfer
> the comparison result, typically the carry bit, into a register suitable for
> multiplication).
<snipped>





More information about the Squeak-dev mailing list