From: Denis Zaitsev <zzz@anda.ru>
To: Zack Weinberg <zack@codesourcery.com>
Cc: Daniel Jacobowitz <drow@mvista.com>,
Ulrich Drepper <drepper@redhat.com>,
Richard Henderson <rth@redhat.com>, Andreas Jaeger <aj@suse.de>,
libc-alpha@sources.redhat.com, linux-gcc@vger.kernel.org,
gcc@gcc.gnu.org
Subject: Re: i386 inline-asm string functions - some questions
Date: Tue, 30 Dec 2003 00:31:47 +0500 [thread overview]
Message-ID: <20031230003147.H6728@zzz.ward.six> (raw)
In-Reply-To: <8765fzjvad.fsf@egil.codesourcery.com>; from zack@codesourcery.com on Mon, Dec 29, 2003 at 11:09:14AM -0800
On Mon, Dec 29, 2003 at 11:09:14AM -0800, Zack Weinberg wrote:
> Denis Zaitsev <zzz@anda.ru> writes:
>
> > On Mon, Dec 29, 2003 at 12:31:52AM -0500, Daniel Jacobowitz wrote:
> >> Funny, I conducted this experiment last week and found quite the
> >> opposite. Compiling the demangler and a smallish yacc parser
> >> with -D__NO_STRING_INLINES cost about 20% in runtime.
> >
> > -D__NO_STRING_INLINES just puts the inlining off. But nobody here
> > tells about the inline/noinline comparing. Of course, inlining is
> > better at speed. The comparison is doing between some versions of the
> > inlining.
>
> No. There is no "of course" here.
Strictly speaking, you are right. But in general, in the real life in
average etc., when strings are too short the effects you are
describing below to appear etc. etc., my "of course" is near enough to
the truth.
> If your inlined functions blow out the instruction cache, it may
> wind up being a net lose.
Definitely. This is why I don't like when the inline functions are
growing, putting the effects of "m" down...
> Same if the out-of-line memcpy takes several more instructions to
> set up but makes damn sure to do aligned memory accesses
> (full-bus-width loads, nontemporal store, prefetches, etc etc etc),
> whereas the inline one doesn't.
First, they are trying to do so here and there (but ok, not fine).
Second, I have experimented with this nonaligned access some time
ago. I don't remember exactly, but it seems that the modern x86
processors do the job as fine as when the memory access is aligned.
But as it was too far ago, I can't recollect the details and so I
won't insist. Better I will repeat the measurements...
next prev parent reply other threads:[~2003-12-29 19:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-25 0:20 i386 inline-asm string functions - some questions Denis Zaitsev
2003-12-25 0:38 ` Richard Henderson
2003-12-25 1:15 ` Denis Zaitsev
2003-12-25 1:21 ` Zack Weinberg
2003-12-25 1:45 ` Denis Zaitsev
2003-12-26 3:40 ` Zack Weinberg
2003-12-27 4:58 ` Richard Henderson
2003-12-27 10:24 ` Zack Weinberg
2003-12-27 11:35 ` Denis Zaitsev
2003-12-27 18:38 ` Zack Weinberg
2003-12-28 20:58 ` Denis Zaitsev
2003-12-29 2:22 ` Zack Weinberg
2003-12-29 2:44 ` Denis Zaitsev
2003-12-29 2:46 ` Zack Weinberg
2003-12-29 2:53 ` Denis Zaitsev
2003-12-29 3:35 ` Ulrich Drepper
2003-12-29 3:54 ` Andrew Pinski
2003-12-29 6:57 ` Jakub Jelinek
2003-12-29 3:56 ` Zack Weinberg
2003-12-29 5:31 ` Daniel Jacobowitz
2003-12-29 5:55 ` Zack Weinberg
2003-12-29 18:37 ` Denis Zaitsev
2003-12-29 19:09 ` Zack Weinberg
2003-12-29 19:31 ` Denis Zaitsev [this message]
2003-12-29 19:37 ` Denis Zaitsev
2003-12-29 18:51 ` Denis Zaitsev
2003-12-29 19:15 ` Zack Weinberg
2003-12-27 10:52 ` Denis Zaitsev
[not found] ` <20031225060850.C7419@zzz.ward.six>
[not found] ` <20031225012711.GD13447@redhat.com>
2003-12-25 1:38 ` Denis Zaitsev
2003-12-25 1:53 ` Richard Henderson
2003-12-25 2:08 ` Denis Zaitsev
2003-12-25 0:39 ` Roland McGrath
2003-12-25 1:13 ` Denis Zaitsev
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=20031230003147.H6728@zzz.ward.six \
--to=zzz@anda.ru \
--cc=aj@suse.de \
--cc=drepper@redhat.com \
--cc=drow@mvista.com \
--cc=gcc@gcc.gnu.org \
--cc=libc-alpha@sources.redhat.com \
--cc=linux-gcc@vger.kernel.org \
--cc=rth@redhat.com \
--cc=zack@codesourcery.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;
as well as URLs for NNTP newsgroup(s).