public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Optimise a build for floating point operation
@ 2003-02-05 10:13 Øystein O Johansen
  2003-02-05 13:13 ` John Love-Jensen
  0 siblings, 1 reply; 7+ messages in thread
From: Øystein O Johansen @ 2003-02-05 10:13 UTC (permalink / raw)
  To: gcc-help

Hi,

I got a program [*] code that makes mostly floating point operations
(written in C and C++). I know this program will run on a Windows 2000
Intel pentium 4 machine. The program is time critical, and I really want to
make it run as fast as possible. Which parameters and options should I send
to gcc when compiling and linking? I'm using mingw 2.0 with gcc 3.2.

gcc --version
gcc (GCC) 3.2 (mingw special 20020817-1)

I'm willing to update the compiler if that will increase the execution
performance of the binary.

-Øystein

[*] It's a neural net based backgammon evaluation program based on GNU
Backgammon

-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Optimise a build for floating point operation
@ 2003-02-05 13:50 Øystein O Johansen
  2003-02-05 14:20 ` John Love-Jensen
  0 siblings, 1 reply; 7+ messages in thread
From: Øystein O Johansen @ 2003-02-05 13:50 UTC (permalink / raw)
  To: John Love-Jensen <eljay; +Cc: gcc-help


Hi, and thanks for your answer.

The code is pretty much profiled and __inline__ed and whatever optimised.
What I was looking for was hints for the compile options to use. Should I
add -mfpa ? (What does it do?) or what about -mnumeric? Will that help the
performance? What about -mfpmath, -mmmx and -msse? What's that?

I'm trying '-O3' versus '-O3 -march=pentium-mmx -mcpu=pentium-mmx -mmmx
-msse -mfpmath=sse'

Is there some other switches I can toggle to increaste the performance of
floating point operation?

Clueless,
-Øystein



-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Optimise a build for floating point operation
@ 2003-02-06  9:51 Øystein O Johansen
  2003-02-06 12:48 ` John Love-Jensen
  0 siblings, 1 reply; 7+ messages in thread
From: Øystein O Johansen @ 2003-02-06  9:51 UTC (permalink / raw)
  To: John Love-Jensen <eljay; +Cc: gcc-help


Thanks,
The program does not use double, but float. Does that means the
-malign-double won't help me?

I'm now using:
-O3 -march=pentium-mmx -mcpu=pentium-mmx -msse -mfpmath=sse -mno-ieee-fp
-ffast-math

Does this sound like a smart setting?

-Øystein


-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-02-06 12:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-05 10:13 Optimise a build for floating point operation Øystein O Johansen
2003-02-05 13:13 ` John Love-Jensen
2003-02-05 13:50 Øystein O Johansen
2003-02-05 14:20 ` John Love-Jensen
2003-02-06  7:29   ` Segher Boessenkool
2003-02-06  9:51 Øystein O Johansen
2003-02-06 12:48 ` John Love-Jensen

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).