the logical xor operator!
Steven Ryan
smryan at garth.UUCP
Wed Jun 29 06:32:29 AEST 1988
The lack of a boolean exclusive-or is probably cultural. Xor is important
for bit fiddling, but few predicates use it. An equivalence operator (even
if it is just a negated xor), on the other hand is useful for boolean but
not bits.
>A good `rule of thumb' is this:
>
> -------------------------------------------------------------
> Logical operators are never slower than arithmetic operators.
> -------------------------------------------------------------
>
>[are there any machines for which this is false?]
Depends how you implement booleans. On a pipelined machine, jumps kill you.
More information about the Comp.std.c
mailing list