Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: "Dave Korn" <dave.korn@artimi.com>
Cc: "'Sheng-Liang Song'" <ssl@baymicrosystems.com>,
		"'Bin Chen'" <binary.chen@gmail.com>,
		"'Eli Zaretskii'" <eliz@gnu.org>, <gdb@sourceware.org>
Subject: Re: (len % 1) != 0
Date: Tue, 19 Feb 2008 21:41:00 -0000	[thread overview]
Message-ID: <je3aro65cw.fsf@sykes.suse.de> (raw)
In-Reply-To: <007f01c87324$00f45a90$2e08a8c0@CAM.ARTIMI.COM> (Dave Korn's 	message of "Tue\, 19 Feb 2008 18\:19\:44 -0000")

"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."


      parent reply	other threads:[~2008-02-19 20:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-17  5:57 Bin Chen
2008-02-17 14:13 ` Eli Zaretskii
2008-02-17 14:41   ` Bin Chen
2008-02-17 15:26     ` Daniel Jacobowitz
2008-02-19 16:32       ` Sheng-Liang Song
2008-02-19 18:25         ` Dave Korn
2008-02-19 18:30           ` David Daney
     [not found]           ` <18363.7810.91075.314867@gargle.gargle.HOWL>
2008-02-19 18:35             ` Dave Korn
2008-02-19 18:47               ` David Daney
2008-02-19 18:49                 ` Daniel Jacobowitz
2008-02-19 19:08                 ` Dave Korn
2008-02-19 21:41           ` Andreas Schwab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=je3aro65cw.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=binary.chen@gmail.com \
    --cc=dave.korn@artimi.com \
    --cc=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=ssl@baymicrosystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox