From: Albert Cahalan <albert@users.sf.net>
To: Richard Henderson <rth@twiddle.net>
Cc: Albert Cahalan <albert@users.sourceforge.net>,
linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: __attribute__((always_inline)) fiasco
Date: 23 Sep 2004 13:46:40 -0400 [thread overview]
Message-ID: <1095961600.4973.958.camel@cube> (raw)
In-Reply-To: <20040923165406.GB11968@twiddle.net>
On Thu, 2004-09-23 at 12:54, Richard Henderson wrote:
> On Thu, Sep 23, 2004 at 12:26:18PM -0400, Albert Cahalan wrote:
> > Are benchmarks significantly affected if you remove the inline?
>
> The routines in question expand to exactly one instruction.
Fine, but that's not what I asked.
I asked if it shows up on benchmarks. It doesn't, does it?
Supposing that it does, then you might use the
alternate instruction replacement trick for this.
That will beat function pointers for speed.
Also, a simple conditional branch might be better
predicted than a function pointer anyway. At least
it will be close.
So you have at least four reasonable choices:
a. don't inline at all
b. have an uninline_foo() version for each foo
c. instruction replacement
d. simple conditional
The simple choices are better, unless you have
benchmarks (whole system ones) that show otherwise.
next prev parent reply other threads:[~2004-09-23 17:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-23 16:26 __attribute__((always_inline)) fiasco Albert Cahalan
2004-09-23 16:50 ` William Lee Irwin III
2004-09-23 16:59 ` Albert Cahalan
2004-09-23 17:03 ` Richard Henderson
2004-09-23 17:21 ` viro
2004-09-23 17:33 ` William Lee Irwin III
2004-09-23 17:39 ` viro
2004-09-26 1:29 ` Tonnerre
2004-09-26 2:05 ` William Lee Irwin III
2004-09-30 16:19 ` Bill Davidsen
2004-09-23 16:54 ` Richard Henderson
2004-09-23 17:46 ` Albert Cahalan [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-09-23 8:47 Richard Henderson
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=1095961600.4973.958.camel@cube \
--to=albert@users.sf.net \
--cc=albert@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
/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