Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Newsgroups: comp.arch.embedded Subject: Re: Slightly OT: speed of operation on a PC Date: Tue, 4 Aug 2015 23:30:49 +0200 Lines: 15 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.dfncis.de Sl9w0oFn5FcjrO6ZyjVIgALl8poLtmWJitvRD9rcBJniZn6Jq58e+0uJX7 Cancel-Lock: sha1:/RX/iktrr/GSph4Ct13+00Dvm3c= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: Xref: csiph.com comp.arch.embedded:21638 Am 04.08.2015 um 19:59 schrieb Tim Wescott: > Which do you think is quicker on a PC, with the latest gnu compiler: > > double a = something; > double b = something else; > > if (a >= 0.0 && b < 0.0) > >>> or << > > if (a * b <= 0) That's rather beside the point, I'm afraid. Those two expressions don't even compute the same condition, so who cares which of them might be quicker?