public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Oleg Verych <olecom@flower.upol.cz>
Cc: Nick Piggin <npiggin@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Paul McKenney <paulmck@us.ibm.com>
Subject: Re: Fast path efficiency (Re: [rfc][patch] dynamic data structure switching)
Date: 06 Sep 2007 13:35:02 +0200	[thread overview]
Message-ID: <p73r6lc9gd5.fsf@bingen.suse.de> (raw)
In-Reply-To: <E1IT3wK-0006Bh-22@flower>

Oleg Verych <olecom@flower.upol.cz> writes:
> 
> What is more efficient in general sense,
> as opposed to s,3,2,1,0 Optimized?

In general it shouldn't matter at all on any reasonably 
modern CPU (let's say less than 10 years old) unless you do
it tens of thousands of times in a loop. Also gcc has reasonable
default heuristics for this kind of stuff anyways
(e.g. return NULL or return negative value is predicted
unlikely by default) 

Cache misses are far more important to care about because
they cost hundreds of cycles.

-Andi

  parent reply	other threads:[~2007-09-06 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-02 18:27 [rfc][patch] dynamic data structure switching Nick Piggin
2007-09-02 18:36 ` Nick Piggin
2007-09-05 23:05   ` Fast path efficiency (Re: [rfc][patch] dynamic data structure switching) Oleg Verych
2007-09-06  7:14     ` Nick Piggin
2007-09-06 11:35     ` Andi Kleen [this message]
2007-09-10 11:55 ` [rfc][patch] dynamic data structure switching Peter Zijlstra
2007-09-10 13:39   ` Nick Piggin

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=p73r6lc9gd5.fsf@bingen.suse.de \
    --to=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=olecom@flower.upol.cz \
    --cc=paulmck@us.ibm.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