This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (len % 1) != 0


"Dave Korn" <dave.korn@artimi.com> writes:

> On 19 February 2008 16:30, Sheng-Liang Song wrote:
>
>> or
>> 
>>  (len  & 1) != 0   <=>  (len % 2) != 0
>> 
>
>   That would have the advantage of not requiring a divide operation :)

The divide operation is already required and can be combined with the
modulo operation.

And this is by no means performance critical.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"Premature optimization is the root of all evil."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]