Article View: comp.std.c
Article #5107Re: the logical xor operator!
From: Steven Ryan
Date: Tue, 28 Jun 1988 20:32
Date: Tue, 28 Jun 1988 20:32
14 lines
1074 bytes
1074 bytes
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.
Technical Details
Message-ID:
<833@garth.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!sri-unix!garth!smryanReferences:
<haddock.4604> <1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> <4772@haddock.ISC.COM> <12178@mimsy.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.std.c Subject: Re: the logical xor operator! Message-ID: <833@garth.UUCP> Date: 28 Jun 88 20:32:29 GMT References: <haddock.4604> <1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> <4772@haddock.ISC.COM> <12178@mimsy.UUCP> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 13