From: Tim Prince <tprince@computer.org>
To: martin.kahlert@infineon.com, gcc@gcc.gnu.org
Subject: Re: march question on pentium4
Date: Fri, 30 Aug 2002 06:52:00 -0000 [thread overview]
Message-ID: <20020830135059.7E6F02CD83@inet1.ywave.com> (raw)
In-Reply-To: <20020830080402.B6474@keksy.muc.infineon.com>
On Thursday 29 August 2002 23:04, Martin Kahlert wrote:
> Hi!
> I use gcc-3.2 release on a FreeBSD system running on a Pentium 4 machine.
>
> My (integer based, no floating point at all) code shows a strange
> behaviour: It is faster when compiled with -march=pentium3 than
> with -march=pentium4. Is this a known issue or a problem that should be
> investigated further?
>
If I am to speculate without an example, the pentium4 costs for shift and
multiply are set so high that the compiler will always use the alternative of
add sequences. Intel's P4 Optimization Guide suggests they be set only high
enough that a shift costs more than 3 adds, for example. You could be
getting excessive code expansion for multiplication by constant.
While the expectation of gcc would be that the costs reflect accurately the
performance of the instructions, high costs which produce long code may not
be best in practice.
Evidently not speaking for anyone.
--
Tim Prince
next prev parent reply other threads:[~2002-08-30 6:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-29 23:04 Martin Kahlert
2002-08-30 6:52 ` Tim Prince [this message]
2002-08-30 12:08 ` Joe Buck
2002-09-01 22:26 ` Tim Prince
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=20020830135059.7E6F02CD83@inet1.ywave.com \
--to=tprince@computer.org \
--cc=gcc@gcc.gnu.org \
--cc=martin.kahlert@infineon.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 read-only IMAP folder(s) and NNTP newsgroup(s).