Mail Archives: djgpp/1997/02/27/08:47:51
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 -