Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!rochester!udel!burdvax!sdcrdcf!trwrb!desint!geoff From: geoff@desint.UUCP (Geoff Kuenning) Newsgroups: comp.sources.bugs Subject: Re: possible bugs in 1.13 gcc Message-ID: <1656@desint.UUCP> Date: 19 Dec 87 21:48:01 GMT References: <3299@tut.cis.ohio-state.edu> Reply-To: geoff@desint.UUCP (Geoff Kuenning) Organization: Interrupt Technology Corp., Manhattan Beach, CA Lines: 16 In article <3299@tut.cis.ohio-state.edu> lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes: > Here are some possible bugs in 1.13 gcc. > if (shorts[7] | shorts[6] | shorts[5] | shorts[4]) > > which (isn't really a bug but) would be better written with || > instead of |. Untrue. The choice of the optimal operator depends on both the CPU architecture and the actual data values. On most CPU's (actually, on every one I've worked on that had booleans at all) using || will make the code take more space, and it will be slower if the first nonzero value is in shorts[5] or shorts[4] (on many machines, it will also be slower if only shorts[7] is zero). -- Geoff Kuenning geoff@ITcorp.com {uunet,trwrb}!desint!geoff