View previous topic :: View next topic |
Author |
Message |
IVIikko Tux's lil' helper
Joined: 07 Feb 2005 Posts: 99 Location: Helsinki, Finland
|
Posted: Sun Apr 17, 2005 12:47 pm Post subject: GCC optimazion? |
|
|
Which are good optimazion flags "CFLAGS" for gcc and other software on amd64? |
|
Back to top |
|
|
inode77 Veteran
Joined: 20 Jan 2004 Posts: 1303 Location: Heart of Europe
|
|
Back to top |
|
|
Psykk n00b
Joined: 04 Feb 2005 Posts: 49
|
Posted: Sun Apr 17, 2005 4:30 pm Post subject: |
|
|
Any problems with O3, anyone? I don't trust any optimizer that isn't doing inlining for stuff like small operators. _________________ The GPL is Harmful |
|
Back to top |
|
|
Lucifeer Tux's lil' helper
Joined: 09 Jun 2004 Posts: 110 Location: Sweden
|
Posted: Sun Apr 17, 2005 5:21 pm Post subject: |
|
|
been running theese flags for a month or so Code: | CFLAGS="-march=athlon64 -mtune=athlon64 -O3 -pipe -ftracer"
LDFLAGS="-Wl,-O1"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden" | The only package that didnt compile with thoose flags was libid3 didnt work with "-fvisibility-inlines-hidden"
Psykk wrote: | Any problems with O3, anyone? I don't trust any optimizer that isn't doing inlining for stuff like small operators. | Not that I've noted _________________ Amd64 3200+ 1024DDR - workstation
AmdXP 1800+ 512sdram - server
Celeron 1.2ghz 128sdram - laptop
AMD64 live-cd w/Reiser4-support http://livecd.todesmut.org/ |
|
Back to top |
|
|
saffron n00b
Joined: 28 Sep 2004 Posts: 22 Location: Redmond, WA
|
Posted: Sun Apr 17, 2005 7:40 pm Post subject: |
|
|
I have been running -O3 -march=k8 -pipe with no problems but I am considering changing that, I have read that most benchmarks do worse with 03 than 02...
Anyone have a definitive answer on the best?? |
|
Back to top |
|
|
inode77 Veteran
Joined: 20 Jan 2004 Posts: 1303 Location: Heart of Europe
|
Posted: Sun Apr 17, 2005 8:53 pm Post subject: |
|
|
There's no definitve answer to that question. Run a benchmark for each app with both optimizations to know which it is for that specific package.
A encoder for mp3 like lame may benefit greatly from O3 but normalday apps may be slowed down due to the fact that O3 generate binaries that are much bigger than O2. Then that has some impact concerning CPU cache size/speed and level, so there's no general answer.
For me a reason more to run O2 even if my CPU has 1M cache is that less optimizations normally are breaking less packages, so I predict a more stable sys.
Just my 20cent (or rappen or centimes or whatever ) |
|
Back to top |
|
|
|