www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/27/08:47:51

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: some advice required
Date: Thu, 27 Feb 1997 08:02:28 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 19
Message-ID: <3315B014.3C8C@cs.com>
References: <Pine DOT LNX DOT 3 DOT 91 DOT 970227000104 DOT 2463A-100000 AT aditya DOT unigoa DOT ernet DOT in>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp105.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Gurunandan R. Bhat wrote:
> 
> greetings,
>         will a kind assembly guru pick this nit please: assuming that x+y
> and x|y give me the same result, which one is faster?

The logical OR is probably much faster, but those two are NOT equivalent
unless x and y have no bits in common!  If you can _guarantee_ that,
then the OR is one of the fastest machine insructions there is.  :)

-- 
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---)
O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++
e(*)>++++ h!() !r !y+()
------END GEEK CODE BLOCK------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019