netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: "David S. Miller" <davem@redhat.com>
Cc: root@chaos.analogic.com, adilger@clusterfs.com,
	jlcooke@certainkey.com, shemminger@osdl.org,
	alan@lxorguk.ukuu.org.uk, tytso@mit.edu, netdev@oss.sgi.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] enhanced version of net_random()
Date: Sun, 22 Aug 2004 17:04:14 +0200	[thread overview]
Message-ID: <20040822170414.3ecab1e5.ak@suse.de> (raw)
In-Reply-To: <20040820124823.071ac1d9.davem@redhat.com>

On Fri, 20 Aug 2004 12:48:23 -0700
"David S. Miller" <davem@redhat.com> wrote:

> > I wouldn't suggest converting it to 'C' because the rotation
> > takes many CPU instructions when one tries to do the test, shift,
> > and OR in 'C',
> 
> You only need 2 'shifts' and an 'or' to do a rotate in C.
> No tests are needed.

gcc is clever enough to detect the common C patterns for rotate
and generate a real ROL when the CPU supports it.

-Andi

  parent reply	other threads:[~2004-08-22 15:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-12 17:48 [RFC] enhanced version of net_random() Stephen Hemminger
2004-08-12 19:48 ` David S. Miller
2004-08-13 18:51   ` Stephen Hemminger
2004-08-13 19:28     ` Andi Kleen
2004-08-16  6:27       ` David S. Miller
2004-08-12 20:02 ` Ben Greear
2004-08-20 17:59 ` Jean-Luc Cooke
2004-08-20 18:47   ` David S. Miller
2004-08-20 18:59   ` Andreas Dilger
2004-08-20 19:22     ` Richard B. Johnson
2004-08-20 19:48       ` David S. Miller
2004-08-20 19:53         ` Jean-Luc Cooke
2004-08-22 15:04         ` Andi Kleen [this message]
2004-08-23 17:05       ` Stephen Hemminger
2004-08-23 18:09         ` Richard B. Johnson
2004-08-20 21:24     ` Lee Revell
2004-08-20 23:55       ` Alan Cox

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=20040822170414.3ecab1e5.ak@suse.de \
    --to=ak@suse.de \
    --cc=adilger@clusterfs.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@redhat.com \
    --cc=jlcooke@certainkey.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=root@chaos.analogic.com \
    --cc=shemminger@osdl.org \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).