From: David Newall <davidn@davidnewall.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: linux-kernel@vger.kernel.org,
"doug.dahlby" <Doug.Dahlby@atheros.com>,
Jiri Slaby <jirislaby@gmail.com>
Subject: Re: Using unsigned int for loop counters - better performance for Architectures - urban hacker legend?
Date: Sat, 31 Jul 2010 19:08:56 +0930 [thread overview]
Message-ID: <4C53EF30.5020303@davidnewall.com> (raw)
In-Reply-To: <AANLkTi=AuFBwT5AjRdjrkbe3=5d36TNr4Cp=r0VnEogH@mail.gmail.com>
I don't know about unsigned int; but looping down to zero should be
faster on many architectures, as they automatically test for zero (or
negative) on decrement. Counting up requires an additional test.
next prev parent reply other threads:[~2010-07-31 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 23:53 Using unsigned int for loop counters - better performance for Architectures - urban hacker legend? Luis R. Rodriguez
2010-07-31 9:38 ` David Newall [this message]
[not found] ` <B7132A25476D334D9130FE7532F2A563109FED150D@SC1EXMB-MBCL.global.atheros.com>
[not found] ` <20100802193712.GB8920@tux>
[not found] ` <B7132A25476D334D9130FE7532F2A563109FED151A@SC1EXMB-MBCL.global.atheros.com>
2010-08-02 20:48 ` Luis R. Rodriguez
2010-08-03 10:06 ` David Newall
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=4C53EF30.5020303@davidnewall.com \
--to=davidn@davidnewall.com \
--cc=Doug.Dahlby@atheros.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@gmail.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