Re: [gentoo-user] CFLAGS questions for Prescott

2005-02-19 Thread Will Clifton
On 21:36 Fri 18 Feb , Walter Dnes wrote:
> On Fri, Feb 18, 2005 at 10:55:51AM -0600, Will Clifton wrote
> > I have a question about my make.conf for my new P4 Prescott 3.2. Before I 
> > get
> > too busy installing I want to set my CFLAGS to get the most out of my chip. 
> > Is
> 
>   -O3 is a baad idea.  Not only does it break some programs, it can
> actually slow down others that don't break.  In order for us to be able
> to better advise you, can you capture the output from "cat /proc/cpuinfo"
> and post it?  The important lines are "model name" and "flags".

Walter and everyone else who replied:

I should have been slightly more clear. I have parts for my new box on the
way, I won't be installing until later in the week as they will arrive when I
am out of town. If you don't mind watching this thread I'll pick it back up
when I return and have my new box put together. I'll post my cpuinfo output
then. Thank you and everyone else for your help, it is much appreciated.

-- 
Will Clifton
[EMAIL PROTECTED]

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS questions for Prescott

2005-02-18 Thread Boyd Stephen Smith Jr.
On Friday 18 February 2005 08:36 pm, "Walter Dnes" <[EMAIL PROTECTED]> 
wrote:
> On Fri, Feb 18, 2005 at 10:55:51AM -0600, Will Clifton wrote
>
> > I have a question about my make.conf for my new P4 Prescott 3.2.
> > Before I get too busy installing I want to set my CFLAGS to get the
> > most out of my chip. Is the following too much? I'm not a programmer,
> > but this is what I got out of reading some forum posts and man gcc. I
> > also read the setting the -march flag to "prescott" causes problems.
> > Has any one else experienced this?

The particular argument to march has to be recognized by gcc; I'm not sure 
what versions (if any) supported prescott as this argument.

> >
> > Any opinions are appreciated.
>
>   -O3 is a baad idea.

Guys, I've been running -O3 ever since I installed gentoo.  It's not broken 
on PII (or any x86 arch).  Theoretically, it can slow down programs 
because of cache issues; I haven't seen this effect in practice.

-O3 is edgy though.  It has been broken (and certain arches) before, and 
may be now or in the future.

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS questions for Prescott

2005-02-18 Thread Walter Dnes
On Fri, Feb 18, 2005 at 10:55:51AM -0600, Will Clifton wrote
> I have a question about my make.conf for my new P4 Prescott 3.2. Before I get
> too busy installing I want to set my CFLAGS to get the most out of my chip. Is
> the following too much? I'm not a programmer, but this is what I got out of
> reading some forum posts and man gcc. I also read the setting the -march flag 
> to "prescott" causes
> problems. Has any one else experienced this? 
> 
> Any opinions are appreciated.

  -O3 is a baad idea.  Not only does it break some programs, it can
actually slow down others that don't break.  In order for us to be able
to better advise you, can you capture the output from "cat /proc/cpuinfo"
and post it?  The important lines are "model name" and "flags".

-- 
Walter Dnes <[EMAIL PROTECTED]>
An infinite number of monkeys pounding away on keyboards will
eventually produce a report showing that Windows is more secure,
and has a lower TCO, than linux.

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS questions for Prescott

2005-02-18 Thread Jean-Francois Gagnon Laporte
On Fri, 18 Feb 2005 10:55:51 -0600, Will Clifton <[EMAIL PROTECTED]> wrote:

> Any opinions are appreciated.
> 
> cflags=-O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -m3dnow
> -fomit-frame-pointer -pipe
> chost=i686-pc-linux-gnu
> makejopts="-j3" ( because of the 2 virtuals cpus?? )
> 
At least remove -m3dnow, it's amd only.

regards,

Jean-Francois


> Thank you for the help.
> --
> Will Clifton
> [EMAIL PROTECTED]
> 
> --
> gentoo-user@gentoo.org mailing list
> 
>

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS questions for Prescott

2005-02-18 Thread John Myers
On Friday 18 February 2005 09:06, Karsten Baumgarten wrote:
> Will Clifton wrote:
> | Also, will I be wanting to enable SMP support in my kernel? I read that
> | somewhere too.
> 
> You definitely want SMP (see above).
You also need SMT (that's the HyperThreading part)

-- 
t3h 3l3ctr0n3rd <[EMAIL PROTECTED]>
Supermarket Deli Clerk and Student Programmer

OpenPGP Key Fingerprint:
0A65 EEFA B23A F0AC E6C2 C71C BEA0 E055 BE0E EC25


pgpervyHabKTd.pgp
Description: PGP signature


Re: [gentoo-user] CFLAGS questions for Prescott

2005-02-18 Thread Benjamin Martin
On 10:55 Fri 18 Feb , Will Clifton wrote:
You can use march=pentium4 and -msse3 to use the SSE3 instruction set
(although there isn't much code around using it). I've been using this
quite successfully for a while.
Also you should enable SMP support in the kernel config.

Cheers,
Ben


> I have a question about my make.conf for my new P4 Prescott 3.2. Before I get
> too busy installing I want to set my CFLAGS to get the most out of my chip. Is
> the following too much? I'm not a programmer, but this is what I got out of
> reading some forum posts and man gcc. I also read the setting the -march flag 
> to "prescott" causes
> problems. Has any one else experienced this? 
> 
> Any opinions are appreciated.
> 
> cflags=-O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -m3dnow
> -fomit-frame-pointer -pipe
> chost=i686-pc-linux-gnu
> makejopts="-j3" ( because of the 2 virtuals cpus?? )
> 
> Also, will I be wanting to enable SMP support in my kernel? I read that
> somewhere too. 
> 
> Thank you for the help.
> -- 
> Will Clifton
> [EMAIL PROTECTED]
> 
> --
> gentoo-user@gentoo.org mailing list

-- 


pgp9Pkv0gQcU4.pgp
Description: PGP signature


Re: [gentoo-user] CFLAGS questions for Prescott

2005-02-18 Thread Karsten Baumgarten
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Will Clifton wrote:
| I have a question about my make.conf for my new P4 Prescott 3.2.
Before I get
| too busy installing I want to set my CFLAGS to get the most out of my
chip. Is
| the following too much? I'm not a programmer, but this is what I got
out of
| reading some forum posts and man gcc. I also read the setting the
- -march flag to "prescott" causes
| problems. Has any one else experienced this?
|
| Any opinions are appreciated.
|
| cflags=-O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -m3dnow
| -fomit-frame-pointer -pipe
- -O3 is generally discouraged (it may break some packages), but if you
want to "get the most out of your chip", it is what you want.
- -mmmx, -msse -m3dnow are implied by -march and thus are redundant.
You might want to add -ftracer. It provides some extra information for
the compiler to improve later optimizations and is safe (i.e., it might
speed up your apps, but never slows them down or increases their size).
In general please don't add every flag to your make.conf that looks
really cool. Usually these tend to break stuff rather than improving
anything. Also CFLAGS are no "magic speed boosters". The difference
between (the usually safe) -O2 and -O3 is usually negligibly small (or
even zero), for the price of a potential unstable system. You have been
warned. :)
| chost=i686-pc-linux-gnu
| makejopts="-j3" ( because of the 2 virtuals cpus?? )
Yes. The -j flag should be set to num(CPU) + 1. Since your CPU has HT
technology, you virtually have two CPUs.
| Also, will I be wanting to enable SMP support in my kernel? I read that
| somewhere too.
You definitely want SMP (see above).
Regards,
Karsten
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCFiCAgUNlsZQzobwRAkiOAJsH4RH3zY9eeykP0d1VArFIEFVF9ACdGaw0
OVgu7v74k8qo38VmoP3GCWA=
=K6Ho
-END PGP SIGNATURE-
--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] CFLAGS query

2005-01-27 Thread Billy Holmes
Ryan Sims wrote:
Another question, somewhat related:  I saw a post re using
"LDFLAGS="-Wl,-O1" in the make.conf file.  However, the gentoo devs
seem to go a little mad whenever they run into this idea, so I quit
that practice.  I'm a little unclear on a) what exactly that does and
b) why it's harmful.  The man page for ld just says that -O "optimizes the output".
while it may work for some packages, when I made it global it started 
weird segfault problems later on. It got so bad that I couldn't get 
through one "emerge -Datuv world" without it bombing. Sometimes a 
re-emerge would work, but I always ran into some packages that just 
didn't like it.

In the end I removed the LDFLAGS and emerge'd system and world from an 
empty tree. System is very happy again.

--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] CFLAGS query

2005-01-27 Thread Ryan Sims
On Wed, 26 Jan 2005 11:34:58 +0800, William Kenworthy
<[EMAIL PROTECTED]> wrote:
> Step 1, take everything in the forums and what others say including me
> with a large dose of scepticism: if you want the truth, test it
> yourself, and look up the man pages for each option and see what it
> really does - not what the forums say as people do not always quote the
> source correctly.

Another question, somewhat related:  I saw a post re using
"LDFLAGS="-Wl,-O1" in the make.conf file.  However, the gentoo devs
seem to go a little mad whenever they run into this idea, so I quit
that practice.  I'm a little unclear on a) what exactly that does and
b) why it's harmful.  The man page for ld just says that -O "optimizes the output".

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS query

2005-01-26 Thread Volker Armin Hemmann
On Thursday 27 January 2005 04:36, Nicolas Bailey wrote:
> Sorry to barge in, but this got me thinking--
>
> My make.conf has a warning about march=pentium4 generating bad sse2
> instructions or somesuch.  I've seen an example using python to
> demonstrate this.  For this reason, quite some time ago, I set my
> march to pentium3 and have left it.  Is it safe at this point to click
> it up or does it still generate bad instructions?
>

I really do not know. Maybe if you search for sse2 bugs in the gentoo bugzilla 
database, you'll find your answer.
But is not not wrong to be carefull.

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS query

2005-01-26 Thread Nicolas Bailey
Sorry to barge in, but this got me thinking--

My make.conf has a warning about march=pentium4 generating bad sse2
instructions or somesuch.  I've seen an example using python to
demonstrate this.  For this reason, quite some time ago, I set my
march to pentium3 and have left it.  Is it safe at this point to click
it up or does it still generate bad instructions?

Nick

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS query

2005-01-26 Thread Volker Armin Hemmann
Hi,

On Wednesday 26 January 2005 05:51, Nick Smith wrote:

>
> then on the forums, people are saying that sse=387 is bad to use, and
> some say ffast-math is bad as well.  i mean how can someone decide what
> to use when everyone has their own opinions.

First, read man gcc.

They say a lot of things about fast-math&Co.

It is a difference to tell gcc to juggle with floating poimt registers 
(fpmath) or if you tell gcc to throw away mathematical precicision.

With mfpmath, registers are shoved around, with fast-math, your system will 
start to calculate very very 'optimistic', with fatal results for most apps 
and libs.

Short: mfpmath may make your app slower. fast-math will make it run 
incorrectly, spilling wrong results.

fast-math is filtered out in most ebuilds, becaue stupid/lazy people are 
setting it gloabal in make.conf and then complaning, that the app segfaults 
or does the wrong things.
But the few apps, that can make use out of fast-math (mplayer for example) 
have it almost always set in their Makefile.

So, do yourself and the gentoo-devs a favour and kill 'fast-math' from your 
make.conf and do not think about it again.

And before you are listening to the same idiots that are using nitro-or 
love-sources, READ THE MANPAGES!


--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS query

2005-01-26 Thread Boyd Stephen Smith Jr.
On Tuesday 25 January 2005 09:34 pm, William Kenworthy <[EMAIL PROTECTED]> 
wrote:
> Step 1, take everything in the forums and what others say including me
> with a large dose of scepticism.

This is true.  Some people are using CFLAGS that are just crazy (to me), 
but swear by them.  Others will have acedotes about CFLAGS that broke 
their system, but might not break yours.

> For instance, on the systems I have, and the applications I tested, -O3
> is slower than -O2 - the reason appears to be that unrolling the loops
> negates the cpu cache on the processors I use (K6-2, t-bird and P4M -
> would love to see if this still the same on the latest 64bit amd
> processors).

This all depends on the code that actually compiled and how big your caches 
are.  That said, check the gcc documentation for ways to intensively tune 
the loop unrolling optimizations, if you have the time.  I simply stick 
with -O3 and am happy with it.

Also, some of the -O3 optimizations have been known to broken, for whatever 
reason.  In fact, I'm fairly sure there are still achitectures out there 
that -O3 breaks.  x86 does not currently break under -O3.  I don't think 
this has ever happened with optimizations in -O2.  -Os sometimes breaks 
things as well.

-O is accepted, but AFAIK, the current gcc code 
doesn't do anything (more) at 4 or above.

For a gentoo system there are a few particulars to keep in mind.  -O3 turns 
on what the gcc developers call "expensive optimizations" that cost a lot 
of compiling time for little runtime gain--it might not be worth it for 
anything 'cept the toolchain since you are compiling everything.  Some 
embuilds may filter out or down the -O options (and others), you can list 
multiple options in make.conf to ensure you get the highest optimization 
possible like: CFLAGS="-O1 -O2 -O3"--the last one not filtered out will 
count.

> ffast-math is bad because it takes shortcuts in maths 
> calculations in the name of speed - producing differences in some
> results: potentially disastrous in scientific calculations.

-ffast-math is an unsafe option, it says as much in the gcc documentation.  
While it speeds up operations, it causes the values to be subtlely 
different for some operations.  Software that is sensitive to math working 
exactly the way the specifications state *will* have problems.

I don't use it, nor any optimization flag that breaks the specification.

> For small fast (fast loading that is) binaries, many swear by -Os, but
> in my testing -Os was quick to load, but took forever on any long term
> processing compared to -O2, so its something you may not want to use on
> a busy server, unless its madly spawning apps - but a pure desktop may
> benefit.

-Os turns on every optimization in -O2 that does not trade off size for 
speed.  While this sounds good, it means that gcc will not make your 
program a single byte longer, even if it (somehow) reduces the running 
time for the innermost loop.  Don't use -Os unless you actually need to 
save space, -O2 doesn't increase size that much.  If there is an ebuild 
out there that does filter out anything 2 or above, but not s, -Os will 
probably give good gains over -O1.

So, my suggested -O CFLAGS are: "-O1 -Os -O2 -O3"

> Also be aware that much of gentoo seems to pay lip-service to letting
> users choose cflags - many applications filter them down to a known good
> selection.

See my comments above about making sure you get the highest optimization 
level.  See my comments below for making sure the code is optimized for 
the right processor.

> Lastly, gains over just using i586 in most cases are about ~10% - well
> worth while.

So, unless you need to share your binaries, make sure you have the correct 
-march setting.  Also, add -mtune= that is the same as your -march=, in 
case the -march gets filtered out.  For example I'd make sure I had at 
least "-march=pentium2 -mtune=pentium2" on my system.

If you do need to share binaries, it's much tougher.  Of course, your 
-march should not be higher that the lowest common denominator system.  
However, tuning for a Pentium 4 might actually hurt performance on a K7 
and vice-versa and for other architecture pairs.  (This could even be true 
between a Pentium 4 and a Pentium 2, but is much less likely.)

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS query

2005-01-26 Thread Alastair Murray
Nick Smith wrote:
then on the forums, people are saying that sse=387 is bad to use
As far as I'm aware the register allocator in gcc isn't smart enough to 
handle -mfpmath=sse,387 effectively yet (even in the forth-coming gcc 
4.0).  It causes sse variables to be stored in 387 registers and 
vice-versa, which can actually slow things down.  However, this is just 
coming off the top of my head so if you have a particularly FP intensive 
app which you think may benefit from this flag: benchmark it.

Alastair Murray.
--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] CFLAGS query

2005-01-25 Thread William Kenworthy
Step 1, take everything in the forums and what others say including me
with a large dose of scepticism: if you want the truth, test it
yourself, and look up the man pages for each option and see what it
really does - not what the forums say as people do not always quote the
source correctly.

For instance, on the systems I have, and the applications I tested, -O3
is slower than -O2 - the reason appears to be that unrolling the loops
negates the cpu cache on the processors I use (K6-2, t-bird and P4M -
would love to see if this still the same on the latest 64bit amd
processors).  ffast-math is bad because it takes shortcuts in maths
calculations in the name of speed - producing differences in some
results: potentially disastrous in scientific calculations.  I have seen
some posts saying mfpmath can produce slower code than just letting gcc
do its thing - something I have not tested.

For small fast (fast loading that is) binaries, many swear by -Os, but
in my testing -Os was quick to load, but took forever on any long term
processing compared to -O2, so its something you may not want to use on
a busy server, unless its madly spawning apps - but a pure desktop may
benefit.

Also be aware that much of gentoo seems to pay lip-service to letting
users choose cflags - many applications filter them down to a known good
selection (that is selected for causing no bug reports, not speed or
performance under *your* specific application) - so this is something to
check for each application you are testing.

Lastly, gains over just using i586 in most cases are about ~10% - well
worth while, but get the cflags wrong and you can easily make it much
slower than pure i386 code in many cases. (in fact choosing -O3 instead
of -O2 did this on one comparison using celerons that I did)

BillK


On Tue, 2005-01-25 at 23:51 -0500, Nick Smith wrote:
> i'm sorry to bring this up, im sure its been discussed countless times
> on here, but i keep getting conflicting information from everywhere i
> look, i was wondering if some people could clear up somethings for me.



--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] CFLAGS [SOLVED]

2004-01-21 Thread Sergey Berezka
Thanks to all. I'll try -O2 or -O3 and see what is better

Sergey Berezka

- Original Message - 
From: "Brendan Sullivan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 10:00 PM
Subject: Re: [gentoo-user] CFLAGS


> I can't help you find that info...but i do know (at least in laymans
> terms) what the basic differences of -O2 and -O3 are.
>
> The -O2 option when compiling, puts references to header files in the
> locations where they are called.
>
> The -O3 option, actually pulls the sections out of the header files, and
> inserts them into the executable code.
>
> Thus, advantage of the -O2 option is that your file sizes stay smaller
> giving you faster load times and conserving hd space. Disadvantage is in
> actual application speed, where you trade off the ability to execute
> code line by line, in order to save space (good for people like me w/
> only 256Mb of RDram)
>
> Advantage of the -O3 option is that the code can just execute
> line-by-line, and not have to reference back to other files to get
> needed code. Makes for faster application speed, but you end up with
> larger files and need for more hd space and memory to efficiently run
> the programs.
>
> Someone correct me if i'm wrong, but that's how it was explained to me.
>
> Brendan
>
> On Tue, 2004-01-20 at 13:40, Michael W. Holdeman wrote:
> > I saw that somewhere too.
> >
> > Can't find it either!
> >
> > Mike
> >
> >
> > On Tuesday 20 January 2004 01:13 pm, Alan wrote:
> > > On Tue, Jan 20, 2004 at 05:33:09PM +0200, Sergey Berezka wrote:
> > > > I have Athlon XP+ 1800 CPU. I type flags
: -march=athlon-xp -03 -pipe
> > > > -fomit-frame-pointer in the make.conf. Now, when i compile any
program ,
> > > > all the time line : unrecognized option '-03' shows up. What is the
> > > > problem ?
> > >
> > > As mentioned by others, it's letter O not number 0.
> > >
> > > As an aside though, I've heard that -O2 works better than -O3,
produces
> > > faster/better code.  Search for it in the forums or google, I don't
> > > remember where I saw it right now.  One of the cases where
> > > over-optimization doesn't help.  I think it might have been a
> > > comparision of adding cflags and testing the results of each.
> > >
> > > alan
> -- 
> Brendan Sullivan
> <[EMAIL PROTECTED]>
>
> --
> [EMAIL PROTECTED] mailing list
>
>


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread qwerty
It's an O and not a zero ;-)

What you shuld write is something like:
-march=athlon-xp -O3 -pipe -fomit-frame-pointer

On Tue, 2004-01-20 at 12:33, Sergey Berezka wrote:
> I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe
> -fomit-frame-pointer in the make.conf.
> Now, when i compile any program , all the time line : unrecognized
> option '-03' shows up.
> What is the problem ?


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread nealbirch
On Tue, 20 Jan 2004 17:33:09 +0200
"Sergey Berezka" <[EMAIL PROTECTED]> wrote:

> I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe
> -fomit-frame-pointer in the make.conf.

just to add my 2 u.s. cents (or one G.Bush dollar) worth, I used those
flags (with the letter O, not the zero) and found things work better
with O2, then I switched to Os, and get much faster speeds. Open Office
especially was noticeably quicker on initial startup.


CFLAGS="-march=athlon-xp -Os -pipe -mfpmath=sse -msse -mmmx -m3dnow 
-fomit-frame-pointer"

I've read that I don't need the mfpmath=sse -msse -mmmx -m3dnow, and
I've also read that I do, if I want them to be used. The way I read man
gcc, it seems if you want to use them, you have to declare them, so I
do.

-- 
How come everyone's going so slow if it's called rush hour?

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread Andrew Farmer
On Tue, 20 Jan 2004 13:26:26 -0800, Brendan Sullivan muttered:
> k, maybe not header files, i'm not a programmer so i dont really know my
> terminology...but it's something to do w/ the code being inline, and
> having to jump out to get other information.

Better explanation:

-O3 (as opposed to -O2) enables some "expensive" optimizations which can
sometimes make the code run faster, but almost always make the code much
larger. In most cases, however, the increased size of the program makes it
run slower, as it will no longer fit in the instruction cache as well, and
will also take longer to load from disk.

-- 
Andrew Farmer
[EMAIL PROTECTED]


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] CFLAGS

2004-01-20 Thread Brendan Sullivan
k, maybe not header files, i'm not a programmer so i dont really know my
terminology...but it's something to do w/ the code being inline, and
having to jump out to get other information.

maybe someone can explain better than me... hope so ;)

Brendan

On Tue, 2004-01-20 at 15:22, Andrew Farmer wrote:
> On Tue, 20 Jan 2004 12:00:15 -0800, Brendan Sullivan muttered:
> > I can't help you find that info...but i do know (at least in laymans
> > terms) what the basic differences of -O2 and -O3 are.
> > 
> > The -O2 option when compiling, puts references to header files in the
> > locations where they are called.
> > 
> > The -O3 option, actually pulls the sections out of the header files, and
> > inserts them into the executable code. 
> 
> Wrong, that's nonsense. Header files don't contain executable code.
-- 
Brendan Sullivan
<[EMAIL PROTECTED]>

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread Andrew Farmer
On Tue, 20 Jan 2004 12:00:15 -0800, Brendan Sullivan muttered:
> I can't help you find that info...but i do know (at least in laymans
> terms) what the basic differences of -O2 and -O3 are.
> 
> The -O2 option when compiling, puts references to header files in the
> locations where they are called.
> 
> The -O3 option, actually pulls the sections out of the header files, and
> inserts them into the executable code. 

Wrong, that's nonsense. Header files don't contain executable code.

-- 
Andrew Farmer
[EMAIL PROTECTED]


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] CFLAGS

2004-01-20 Thread Stijn Vander Maelen
On Tue, 2004-01-20 at 16:33, Sergey Berezka wrote:
> I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe
> -fomit-frame-pointer in the make.conf.

you typed a zero in "-03", it should "-O3" (with the "o" as in "option")

> Now, when i compile any program , all the time line : unrecognized
> option '-03' shows up.
> What is the problem ?
-- 
Stijn Vander Maelen <[EMAIL PROTECTED]>
Infogroep


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread Brendan Sullivan
I can't help you find that info...but i do know (at least in laymans
terms) what the basic differences of -O2 and -O3 are.

The -O2 option when compiling, puts references to header files in the
locations where they are called.

The -O3 option, actually pulls the sections out of the header files, and
inserts them into the executable code. 

Thus, advantage of the -O2 option is that your file sizes stay smaller
giving you faster load times and conserving hd space. Disadvantage is in
actual application speed, where you trade off the ability to execute
code line by line, in order to save space (good for people like me w/
only 256Mb of RDram)

Advantage of the -O3 option is that the code can just execute
line-by-line, and not have to reference back to other files to get
needed code. Makes for faster application speed, but you end up with
larger files and need for more hd space and memory to efficiently run
the programs.

Someone correct me if i'm wrong, but that's how it was explained to me.

Brendan

On Tue, 2004-01-20 at 13:40, Michael W. Holdeman wrote:
> I saw that somewhere too.
> 
> Can't find it either!
> 
> Mike
> 
> 
> On Tuesday 20 January 2004 01:13 pm, Alan wrote:
> > On Tue, Jan 20, 2004 at 05:33:09PM +0200, Sergey Berezka wrote:
> > > I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe
> > > -fomit-frame-pointer in the make.conf. Now, when i compile any program ,
> > > all the time line : unrecognized option '-03' shows up. What is the
> > > problem ?
> >
> > As mentioned by others, it's letter O not number 0.
> >
> > As an aside though, I've heard that -O2 works better than -O3, produces
> > faster/better code.  Search for it in the forums or google, I don't
> > remember where I saw it right now.  One of the cases where
> > over-optimization doesn't help.  I think it might have been a
> > comparision of adding cflags and testing the results of each.
> >
> > alan
-- 
Brendan Sullivan
<[EMAIL PROTECTED]>

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread Michael W. Holdeman
I saw that somewhere too.

Can't find it either!

Mike


On Tuesday 20 January 2004 01:13 pm, Alan wrote:
> On Tue, Jan 20, 2004 at 05:33:09PM +0200, Sergey Berezka wrote:
> > I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe
> > -fomit-frame-pointer in the make.conf. Now, when i compile any program ,
> > all the time line : unrecognized option '-03' shows up. What is the
> > problem ?
>
> As mentioned by others, it's letter O not number 0.
>
> As an aside though, I've heard that -O2 works better than -O3, produces
> faster/better code.  Search for it in the forums or google, I don't
> remember where I saw it right now.  One of the cases where
> over-optimization doesn't help.  I think it might have been a
> comparision of adding cflags and testing the results of each.
>
> alan

-- 
Michael W. Holdeman

Why keep payin g for windoze??
Powered by Gentoo Linux 1.2 www.gentoo.org
Linux Kernel 2.4.22_rc2-gss lowlatency, preemptable
Windows Apps thanks to Win4Lin 5.0 www.netraverse.com


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread Alan
On Tue, Jan 20, 2004 at 05:33:09PM +0200, Sergey Berezka wrote:
> I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe 
> -fomit-frame-pointer in the make.conf.
> Now, when i compile any program , all the time line : unrecognized option '-03' 
> shows up.
> What is the problem ?

As mentioned by others, it's letter O not number 0.  

As an aside though, I've heard that -O2 works better than -O3, produces
faster/better code.  Search for it in the forums or google, I don't
remember where I saw it right now.  One of the cases where
over-optimization doesn't help.  I think it might have been a
comparision of adding cflags and testing the results of each.

alan
-- 
Alan <[EMAIL PROTECTED]> - http://arcterex.net

"There are only 3 real sports: bull-fighting, car racing and mountain 
climbing. All the others are mere games."-- Hemingway

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread Sergey Berezka
This is really '-0(zero)3' not '-O3'

- Original Message - 
From: "KamaolaKid" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 5:37 PM
Subject: Re: [gentoo-user] CFLAGS


> Sergey Berezka wrote:
> > I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe 
> > -fomit-frame-pointer in the make.conf.
> > Now, when i compile any program , all the time line : unrecognized 
> > option '-03' shows up.
> > What is the problem ?
> 
> Make sure it is 'O' as in the letter O, not 0 as in zero.
> 
> -- Kyle S.
> 
> --
> [EMAIL PROTECTED] mailing list
> 
>

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread Manuel Pérez López
Change 0 (zero) for O (vowel)


El Martes, 20 de Enero de 2004 16:33, Sergey Berezka escribió:
> I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe
> -fomit-frame-pointer in the make.conf. Now, when i compile any program ,
> all the time line : unrecognized option '-03' shows up. What is the problem
> ?

-- 


---
Cordiales saludos
Manuel Pérez López
[EMAIL PROTECTED]
http://www.ieduca.net/

---

---





Gentoo Linux: 
Portage 2.0.49 
gcc 3.2.3 Linux 2.6.1



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2004-01-20 Thread KamaolaKid
Sergey Berezka wrote:
I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe 
-fomit-frame-pointer in the make.conf.
Now, when i compile any program , all the time line : unrecognized 
option '-03' shows up.
What is the problem ?
Make sure it is 'O' as in the letter O, not 0 as in zero.

-- Kyle S.

--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] CFLAGS

2004-01-20 Thread Canek Peláez Valdés
I think you want "-O3", not "-03". Is an "O" letter, not a "0" number.

On Tue, 2004-01-20 at 09:33, Sergey Berezka wrote:
> I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe
> -fomit-frame-pointer in the make.conf.
> Now, when i compile any program , all the time line : unrecognized
> option '-03' shows up.
> What is the problem ?

Canek
--
The program isn't debugged until the last user is dead.


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-user] CFLAGS

2004-01-20 Thread Fabien Fivaz
It's -O3 not zero-3 !!!

Sergey Berezka wrote:

I have Athlon XP+ 1800 CPU. I type flags : -march=athlon-xp -03 -pipe 
-fomit-frame-pointer in the make.conf.
Now, when i compile any program , all the time line : unrecognized 
option '-03' shows up.
What is the problem ?


--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] CFLAGS

2003-12-01 Thread Oliver Lange
Van Eps, Nathan D. (James Tower) wrote:
A lot of people seem to not use "-O3", because it can cause worse
performance in some situations. I'm gonna leave it in my "make.conf" till
someone (maybe me, if I get some free time) shows that it causes worse
performance on average. Because that is really what the flags in "make.conf"
should be geared toward. They should be geared toward what gives you the
best performance on average (without breaking things).
I asked myself the same question, but i'm too lazy to check this out -
compiling alone would take langer than one night on my box (fast cpu
but tons of software), and i ask myself which tests to run and which
apps to test...
I'll probably switch back to -O2, because:

- O3 is only required for functions/methods that do heavy computing
  without calling many system functions in between. That's only true
  for compiling, audio/video computing and the like.
- O3 compiled binaries are much larger, about 30-50% (not excessively tested),
  so loading takes a little bit longer, and some code may no longer fit into
  the CPU's code cache, breaking computing performance.
- As long as i don't really know about concrete examples shown by other
  users in comparison tests, i guess i'll choose the smaller binaries.
--
[EMAIL PROTECTED] mailing list


RE: [gentoo-user] CFLAGS

2003-12-01 Thread Van Eps, Nathan D. (James Tower)
A lot of people seem to not use "-O3", because it can cause worse
performance in some situations. I'm gonna leave it in my "make.conf" till
someone (maybe me, if I get some free time) shows that it causes worse
performance on average. Because that is really what the flags in "make.conf"
should be geared toward. They should be geared toward what gives you the
best performance on average (without breaking things).

-Nathan


>-Original Message-
>From: Jason Stubbs
>
>On Saturday 29 November 2003 05:57, Vano Beridze wrote:
>> I installed gentoo from stage 1 (took 1 day) with the following settings
>>
>> CHOST="i686-pc-linux-gnu"
>> CFLAGS="-march=athlon-xp -O3"
>> CXXFLAGS="-march=athlon-xp -O3"
>>
>> On the same machine with RedHat 9 (i386 packages)
>> NetBeans 3.5.1(sun jdk 1.4.2_02) runs faster.
>> What is the problem? Are my flags set incorrectly?
>
>The biggest improvement in performance will come by adding 
>-fomit-frame-pointer to your flags. I would also suggest -O2. -O3 only
brings 
>performance improvements in a few situations and can cause worse
performance 
>in others.


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-30 Thread Ulrich Rhein
Michael Schreckenbauer <[EMAIL PROTECTED]> writes:
> Am Samstag, 29. November 2003 16:31 schrieb Ulrich Rhein:
>> Jason Stubbs <[EMAIL PROTECTED]> writes:
>> > On Saturday 29 November 2003 22:25, Ulrich Rhein wrote:
>> >> Jason Stubbs <[EMAIL PROTECTED]> writes:

>> >> > The biggest improvement in performance will come by adding
>> >> > -fomit-frame-pointer to your flags.
>> >> That won't actually change anything but remove three instructions from
>> >> some function calls. The resulting performance improvement is
>> >> practically insignificant.
>> > WTF? Have you tried it?
>> Yes.
> Shure? Compiling and timing one small program is no test.

What about reading assembler diffs and counting CPU cycles?

>> > Benchmarks give a 30% improvement across the board and
>> > I must say there definately is a very noticable improvement to system
>> > responsiveness.
>> Entirely unrealistic.
> Arguments? 30% is very optimistic, but I notice speed improvements too.

The practical results of -fomit-frame-pointer is that gcc removes three
instructions from some C funtions. There is no explanation why this
should give such a radical improvement.

>> > It may only remove three instructions from some function
>> > calls, but it frees up a register or two allowing for better optimisation
>> > in other ways.
>> On x86, it's exactly one register (namely %ebp). I have tried it with
>> gcc -S -O2 on a small project (~1.600 SLOC) of mine. In the functions in
>> which %ebp is not used as frame pointer, it is not used at all.
> So you tested it with one of your own programs and say we are telling shit?

I didn't time in this program (which would be completely stupid anyway,
because it is entirely I/O-bound), but I generated the assembler output
(gcc's -S switch), once with -fomit-frame-pointer and once
without. Then, I diffed the resulting files. I didn't find any occasion
where gcc uses %ebp as anything but the frame pointer. The only reason I
used my own project was that I could easily modify the Makefile.

Another thing I measured was the latency of a function call on my athlon
box. This is gcc -S of an empty function, compiled without
-fomit-frame-pointer:
,
| .p2align 4,,15
| .globl f
| .type   f,@function
| f:
| pushl   %ebp
| movl%esp, %ebp
| popl%ebp
| ret
`
Takes 15 cycles.

And now with -fomit-frame-pointer:
,
| .p2align 4,,15
| .globl f
| .type   f,@function
| f:
| ret
`
Takes 15 cycles as well.

> I had my whole system compiled without this flag, then the only change
> was adding it (and of course I recompiled my system). There was a
> noticable performance boost. The desktop is much more responsive, not
> only in my imagination.

Would you mind to give some reproduceable situations?

>> Could you point out some pieces of code where gcc does such an
>> optimization?
> No need for this. Just use google to get the answer. 

Eh? I asked for assembler diffs. Where can I find them on google?

Gruß Uli
-- 
"Or have we eaten on the insane root,
 that takes the reason prisoner?"  -- MacBeth I, 3


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-30 Thread Michael Schreckenbauer
Hi,

Am Samstag, 29. November 2003 16:31 schrieb Ulrich Rhein:
> Jason Stubbs <[EMAIL PROTECTED]> writes:
> > On Saturday 29 November 2003 22:25, Ulrich Rhein wrote:
> >> Jason Stubbs <[EMAIL PROTECTED]> writes:
> >> > The biggest improvement in performance will come by adding
> >> > -fomit-frame-pointer to your flags.
> >>
> >> That won't actually change anything but remove three instructions from
> >> some function calls. The resulting performance improvement is
> >> practically insignificant.
> >
> > WTF? Have you tried it?
>
> Yes.

Shure? Compiling and timing one small program is no test.

> > Benchmarks give a 30% improvement across the board and
> > I must say there definately is a very noticable improvement to system
> > responsiveness.
>
> Entirely unrealistic.

Arguments? 30% is very optimistic, but I notice speed improvements too.

> > It may only remove three instructions from some function
> > calls, but it frees up a register or two allowing for better optimisation
> > in other ways.
>
> On x86, it's exactly one register (namely %ebp). I have tried it with
> gcc -S -O2 on a small project (~1.600 SLOC) of mine. In the functions in
> which %ebp is not used as frame pointer, it is not used at all.

So you tested it with one of your own programs and say we are telling shit? I 
had my whole system compiled without this flag, then the only change was 
adding it (and of course I recompiled my system). There was a noticable 
performance boost. The desktop is much more responsive, not only in my 
imagination.

> Could you point out some pieces of code where gcc does such an
> optimization?

No need for this. Just use google to get the answer. 

> Gruß Uli

Grüße
vom Michael


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-29 Thread Jason Stubbs
On Sunday 30 November 2003 00:31, Ulrich Rhein wrote:
> Jason Stubbs <[EMAIL PROTECTED]> writes:
> > On Saturday 29 November 2003 22:25, Ulrich Rhein wrote:
> >> Jason Stubbs <[EMAIL PROTECTED]> writes:
> >> > The biggest improvement in performance will come by adding
> >> > -fomit-frame-pointer to your flags.
> >>
> >> That won't actually change anything but remove three instructions from
> >> some function calls. The resulting performance improvement is
> >> practically insignificant.
> >
> > WTF? Have you tried it?
>
> Yes.
>
> > Benchmarks give a 30% improvement across the board and
> > I must say there definately is a very noticable improvement to system
> > responsiveness.
>
> Entirely unrealistic.
>
> > It may only remove three instructions from some function
> > calls, but it frees up a register or two allowing for better optimisation
> > in other ways.
>
> On x86, it's exactly one register (namely %ebp). I have tried it with
> gcc -S -O2 on a small project (~1.600 SLOC) of mine. In the functions in
> which %ebp is not used as frame pointer, it is not used at all.
>
> Could you point out some pieces of code where gcc does such an
> optimization?

Nope and I don't plan to, but the performance gain is there nonetheless.

Jason

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-29 Thread Ulrich Rhein
Jason Stubbs <[EMAIL PROTECTED]> writes:
> On Saturday 29 November 2003 22:25, Ulrich Rhein wrote:
>> Jason Stubbs <[EMAIL PROTECTED]> writes:
>> > The biggest improvement in performance will come by adding
>> > -fomit-frame-pointer to your flags.
>> That won't actually change anything but remove three instructions from
>> some function calls. The resulting performance improvement is
>> practically insignificant.
> WTF? Have you tried it?

Yes.

> Benchmarks give a 30% improvement across the board and 
> I must say there definately is a very noticable improvement to system 
> responsiveness.

Entirely unrealistic. 

> It may only remove three instructions from some function 
> calls, but it frees up a register or two allowing for better optimisation in 
> other ways.

On x86, it's exactly one register (namely %ebp). I have tried it with
gcc -S -O2 on a small project (~1.600 SLOC) of mine. In the functions in
which %ebp is not used as frame pointer, it is not used at all.

Could you point out some pieces of code where gcc does such an
optimization?

Gruß Uli
-- 
"Or have we eaten on the insane root,
 that takes the reason prisoner?"  -- MacBeth I, 3


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-29 Thread Oliver Lange
Jason Stubbs wrote:
The biggest improvement in performance will come by adding
-fomit-frame-pointer to your flags.

I must say there definately is a very noticable improvement to system 
responsiveness. It may only remove three instructions from some function 
calls, but it frees up a register or two allowing for better optimisation in 
other ways.
Yeah, using registers is an extreme speedup, so gaining one (or more)
should indeed be noticeable.
--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] CFLAGS

2003-11-29 Thread Jason Stubbs
On Saturday 29 November 2003 22:28, Ulrich Rhein wrote:
> Jason Stubbs <[EMAIL PROTECTED]> writes:
> > I've found with my AthlonXP that when using -Os just about everything
> > runs much slower. Most noticably was kmail which took about 3 times as
> > long to clean up the mail folders on exit. Pretty much everything ran
> > sluggish though.
>
> It's *very* unlikely that this is due to -Os.

Recompiling exactly the same software, meaning the whole system, on exactly 
the same hardware with exactly the same USE flags with all other CFLAGS 
exactly the same made a huge difference. Can you tell me something else it 
might be due to?

Jason

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-29 Thread William Kenworthy
On an athlon Tbird with 1G ram, -Os is very very slow compared to -O2
(measured).  -Os seems to be better on (very?) low memory machines, but
I have only measured on the athlon and am going on others for that info.

-fomit-frame-pointer gave a slight, but measurable improvement - hardly
worth the effort of typing it ...

But dont just take anyones word for it, start measuring and testing as
it seems that almost every system behaves differently, and everyone uses
different applications in a different manner.

BillK

On Sat, 2003-11-29 at 21:28, Ulrich Rhein wrote:
> Jason Stubbs <[EMAIL PROTECTED]> writes:
> 
> > I've found with my AthlonXP that when using -Os just about everything runs 
> > much slower. Most noticably was kmail which took about 3 times as long to 
> > clean up the mail folders on exit. Pretty much everything ran sluggish 
> > though.
> 
> It's *very* unlikely that this is due to -Os.
> 
> Gruß Uli
-- 
William Kenworthy <[EMAIL PROTECTED]>


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-29 Thread Jason Stubbs
On Saturday 29 November 2003 22:25, Ulrich Rhein wrote:
> Jason Stubbs <[EMAIL PROTECTED]> writes:
> > The biggest improvement in performance will come by adding
> > -fomit-frame-pointer to your flags.
>
> That won't actually change anything but remove three instructions from
> some function calls. The resulting performance improvement is
> practically insignificant.

WTF? Have you tried it? Benchmarks give a 30% improvement across the board and 
I must say there definately is a very noticable improvement to system 
responsiveness. It may only remove three instructions from some function 
calls, but it frees up a register or two allowing for better optimisation in 
other ways.

Jason

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-29 Thread Ulrich Rhein
Jason Stubbs <[EMAIL PROTECTED]> writes:

> I've found with my AthlonXP that when using -Os just about everything runs 
> much slower. Most noticably was kmail which took about 3 times as long to 
> clean up the mail folders on exit. Pretty much everything ran sluggish 
> though.

It's *very* unlikely that this is due to -Os.

Gruß Uli
-- 
"Or have we eaten on the insane root,
 that takes the reason prisoner?"  -- MacBeth I, 3


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-29 Thread Ulrich Rhein
Jason Stubbs <[EMAIL PROTECTED]> writes:

> The biggest improvement in performance will come by adding 
> -fomit-frame-pointer to your flags.

That won't actually change anything but remove three instructions from
some function calls. The resulting performance improvement is
practically insignificant.

Gruß Uli
-- 
"Or have we eaten on the insane root,
 that takes the reason prisoner?"  -- MacBeth I, 3


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-28 Thread Oliver Lange
Dennis Robertson wrote:
Is that d O h? I wonder why it accepted -03? Oh well, I'll know for next
time. Thanks, Jason.
Really strange, i dunno of any option beginning wit a digit..

BTW: here's an overview about all options (latest GCC)

http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/Option-Summary.html#Option%20Summary



--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] CFLAGS

2003-11-28 Thread Dennis Robertson
Is that d O h? I wonder why it accepted -03? Oh well, I'll know for next
time. Thanks, Jason.
- Original Message - 
From: "Jason Stubbs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 29, 2003 11:59 AM
Subject: Re: [gentoo-user] CFLAGS


> On Saturday 29 November 2003 10:39, Dennis Robertson wrote:
> > I reinstalled yesterday and gcc refused to recognise -02 as an option. I
> > was forced to use -03, which went OK. Then kde-base/kdelibs-3.1.4 failed
> > (function kde_src_compile died) so I share the sentiment about whether
its
> > worth it. But then, there's the challenge.
>
> You want the letter O rather than the number 0 in the above switches.
>
> Jason
>
> --
> [EMAIL PROTECTED] mailing list
>
>
>



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-28 Thread Jason Stubbs
On Saturday 29 November 2003 10:39, Dennis Robertson wrote:
> I reinstalled yesterday and gcc refused to recognise -02 as an option. I
> was forced to use -03, which went OK. Then kde-base/kdelibs-3.1.4 failed
> (function kde_src_compile died) so I share the sentiment about whether its
> worth it. But then, there's the challenge.

You want the letter O rather than the number 0 in the above switches.

Jason

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-28 Thread Dennis Robertson
I reinstalled yesterday and gcc refused to recognise -02 as an option. I was
forced to use -03, which went OK. Then kde-base/kdelibs-3.1.4 failed
(function kde_src_compile died) so I share the sentiment about whether its
worth it. But then, there's the challenge.
Dennis
- Original Message - 
From: "Jason Stubbs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 28, 2003 11:06 PM
Subject: Re: [gentoo-user] CFLAGS


> On Saturday 29 November 2003 05:57, Vano Beridze wrote:
> > I installed gentoo from stage 1 (took 1 day) with the following settings
> >
> > CHOST="i686-pc-linux-gnu"
> > CFLAGS="-march=athlon-xp -O3"
> > CXXFLAGS="-march=athlon-xp -O3"
> >
> > On the same machine with RedHat 9 (i386 packages)
> > NetBeans 3.5.1(sun jdk 1.4.2_02) runs faster.
> > What is the problem? Are my flags set incorrectly?
>
> The biggest improvement in performance will come by adding
> -fomit-frame-pointer to your flags. I would also suggest -O2. -O3 only
brings
> performance improvements in a few situations and can cause worse
performance
> in others.
>
> Jason
>
> P.S. Any information I didn't include above was simply a deterrant to
people
> that might answer your question.
>
> --
> [EMAIL PROTECTED] mailing list
>
>
>



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-28 Thread Jason Stubbs
On Friday 28 November 2003 22:19, Andrew Gaffney wrote:
> Vano Beridze wrote:
> > Hello
> >
> > I have
> > AMD Athlon XP 2400+, 1GB RAM
> >
> > I installed gentoo from stage 1 (took 1 day) with the following settings
> >
> > CHOST="i686-pc-linux-gnu"
> > CFLAGS="-march=athlon-xp -O3"
> > CXXFLAGS="-march=athlon-xp -O3"
> >
> > What a surprise:
> >
> > On the same machine with RedHat 9 (i386 packages)
> >
> > NetBeans 3.5.1(sun jdk 1.4.2_02) runs faster.
> >
> > What is the problem? Are my flags set incorrectly?
>
> Through the use of benchmarks, users have recently been discovering that
> '-O3' can actually give you *slower* programs than '-O2'. While the code
> that is generated with '-O3' is more optimized, it is also larger, which in
> some/most cases, causes it not to fit into the processor cache which gives
> you a large performance hit. In general, I think the best flags for you
> would be '-march=athlon-xp -O2 -fomit-frame-pointer' or '-march=athlon-xp
> -Os -fomit-frame-pointer' where '-Os' is the same as '-O2' but it generates
> smaller binaries.

I've found with my AthlonXP that when using -Os just about everything runs 
much slower. Most noticably was kmail which took about 3 times as long to 
clean up the mail folders on exit. Pretty much everything ran sluggish 
though.

Jason

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-28 Thread purslow
031128 Vano Beridze wrote:
> I have AMD Athlon XP 2400+, 1GB RAM
> I installed gentoo from stage 1 (took 1 day)  What a surprise:
> On the same machine with RedHat 9 (i386 packages)
> NetBeans 3.5.1(sun jdk 1.4.2_02) runs faster.
> I switched to gentoo because I wanted faster and customized system.
> But If I see that Gentoo does not perform better
> unfortunately I will have to try Fedora :(
> Please help me to stay

i have a similar machine & no complaints re sloth.
the idea of Gentoo is not so much to maximise program performance
as to give the user his/her own custom system, ie a "meta-distribution".
a/a RH you get the advantages of Portage vs RPM
& you install just what you want, not  2,5 GB  pgms you never use;
also, the method of managing services etc is much more elegant
& dox are generally comprehensive & very well-written;
there's also a large, knowledgeable & friendly gang of users Worldwide
w an excellent Forum as well as this mailing-list.
just see what Linux Weekly News had to say last week!

-- 
,,
SUPPORT ___//___,  Philip Webb : [EMAIL PROTECTED]
ELECTRIC   /] [] [] [] [] []|  Centre for Urban & Community Studies
TRANSIT`-O--O---'  University of Toronto

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-28 Thread Andrew Gaffney
Vano Beridze wrote:
Hello

I have
AMD Athlon XP 2400+, 1GB RAM
I installed gentoo from stage 1 (took 1 day) with the following settings

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3"
CXXFLAGS="-march=athlon-xp -O3"
What a surprise:

On the same machine with RedHat 9 (i386 packages)

NetBeans 3.5.1(sun jdk 1.4.2_02) runs faster.

What is the problem? Are my flags set incorrectly?
Through the use of benchmarks, users have recently been discovering that '-O3' can 
actually give you *slower* programs than '-O2'. While the code that is generated with 
'-O3' is more optimized, it is also larger, which in some/most cases, causes it not to fit 
into the processor cache which gives you a large performance hit. In general, I think the 
best flags for you would be '-march=athlon-xp -O2 -fomit-frame-pointer' or 
'-march=athlon-xp -Os -fomit-frame-pointer' where '-Os' is the same as '-O2' but it 
generates smaller binaries.

--
Andrew Gaffney
--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] CFLAGS

2003-11-28 Thread David Gethings
On Fri, 2003-11-28 at 20:57, Vano Beridze wrote:
> I switched to gentoo because I wanted faster and customized system.
Gentoo is highly customizable. But that does not guarentee a faster
system. The intricate web of hardware spec, application, comuter usage
and gcc flags is a complex one.

There have been a number of discussions on this group about this very
matter. I highly recomend you search through the archive. This should
give you all the (mis-)information you will need.

Sadly there is no -fgo-fast-strips gcc flag. Oh I wish it was that
simple ;)

Cheers

Dg


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS

2003-11-28 Thread Jason Stubbs
On Saturday 29 November 2003 05:57, Vano Beridze wrote:
> I installed gentoo from stage 1 (took 1 day) with the following settings
>
> CHOST="i686-pc-linux-gnu"
> CFLAGS="-march=athlon-xp -O3"
> CXXFLAGS="-march=athlon-xp -O3"
>
> On the same machine with RedHat 9 (i386 packages)
> NetBeans 3.5.1(sun jdk 1.4.2_02) runs faster.
> What is the problem? Are my flags set incorrectly?

The biggest improvement in performance will come by adding 
-fomit-frame-pointer to your flags. I would also suggest -O2. -O3 only brings 
performance improvements in a few situations and can cause worse performance 
in others.

Jason

P.S. Any information I didn't include above was simply a deterrant to people 
that might answer your question.

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS stuff

2003-10-24 Thread Rick [Kitty5]
Jernej Zidar wrote:
> 2. Is there a list of recommended CLAGS for a P4 desktop system?

This is geared towards an AthlonXP, interesting reading all the same

http://home.comcast.net/~jcunningham63/linux/GCC_Optimization.html


Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News & Resources http://Povray.co.uk
TEL : +44 (01270) 501101 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS stuff

2003-10-23 Thread sean m.
On 2003.10.23 09:35, Jernej Zidar wrote:
Hi all.

I have two questions regarding CFLAGS:

1. Is there a list of all CFLAGS that can be set?
check gcc's man page or http://gcc.gnu.org/onlinedocs/ for your version 
of gcc.

2. Is there a list of recommended CLAGS for a P4 desktop system?
i compiled most of my software with "-march=pentium4 -O2 -pipe -fomit-
frame-pointer" with gcc 3.2.3, but a lot of users say that is rather 
conservative.

there is a ton of discussion (past and present) on the subject on this 
list's archives at http://news.gmane.org/gmane.linux.gentoo.user or at 
http://forums.gentoo.org . i'm not aware of any recommended 
optimizations otherwise.

My aim is to make my system as fast as possible and not make it
unbootable.
sean

--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] CFLAGS for p3?

2003-10-01 Thread Rick [Kitty5]
> I've found -Os faster.

have you any benchmarks to show this, or does it just feel faster?

While I am on the subject, what do people suggest for benchmarking?

Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News & Resources http://Povray.co.uk
TEL : +44 (01270) 501101 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS for p3?

2003-09-30 Thread Norberto Bensa
Paul Fraser wrote:
> I'm using "-march=pentium3 -O3 -pipe -mmmx -msse -fomit-frame-pointer
> -fforce-addr -falign-functions=4 -fprefetch-loop-arrays" and I'm yet to
> run into any problems.

I've found -Os faster. I'm rebuilding the whole system (including kernel) with 
-Os

Best regards,
Norberto


pgp0.pgp
Description: signature


Re: [gentoo-user] CFLAGS for p3?

2003-09-30 Thread Hemmann, Volker Armin
On Tuesday 30 September 2003 08:29, Rick [Kitty5] wrote:
> Hi all,
>
> Any recommendations for system wide CFLAGS for a P3?
>
> Rick

-march=pentium3 -Os -fomit-frame-pointer -msse -mfpmath=sse

-- 
Conclusions
 In a straight-up fight, the Empire squashes the Federation like a bug. Even 
with its numerical advantage removed, the Empire would still squash the 
Federation like a bug. Accept it. -Michael Wong


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS for p3?

2003-09-30 Thread Paul Fraser
I'm using "-march=pentium3 -O3 -pipe -mmmx -msse -fomit-frame-pointer
-fforce-addr -falign-functions=4 -fprefetch-loop-arrays" and I'm yet to
run into any problems.

On Tue, 2003-09-30 at 18:29, Rick [Kitty5] wrote:
> Hi all,
> 
> Any recommendations for system wide CFLAGS for a P3?
> 
> Rick
> 
> Kitty5 NewMedia http://Kitty5.com
> POV-Ray News & Resources http://Povray.co.uk
> TEL : +44 (01270) 501101 - ICQ : 15776037
> 
> PGP Public Key
> http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA
> 
> --
> [EMAIL PROTECTED] mailing list
-- 
Cheers,

Paul J. Fraser
[EMAIL PROTECTED]


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS in make.conf

2003-08-26 Thread Marius Mauch
On Tue, 26 Aug 2003 19:22:20 -0400
b stephen harding <[EMAIL PROTECTED]> wrote:

> On Wed, 20 Aug 2003 17:30:09 -0400
> Luis Morales <[EMAIL PROTECTED]> wrote:
> 
> > Now the others flag  mmx, mmx2, 3dnow, 3dnow2, etc you must be
> > setting
> > 
> which AMD processors use the 3dnow2 instruction set?

Athlon Thunderbird / Duron and later.

Marius

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS in make.conf

2003-08-26 Thread b stephen harding
On Wed, 20 Aug 2003 17:30:09 -0400
Luis Morales <[EMAIL PROTECTED]> wrote:

> Now the others flag  mmx, mmx2, 3dnow, 3dnow2, etc you must be setting
> 
which AMD processors use the 3dnow2 instruction set?
-- 
bruce


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] CFLAGS in make.conf

2003-08-20 Thread Jason Stubbs
On Thursday 21 August 2003 03:37, Meka[ni] wrote:
>   I'm using "-O3 -march=pentium2 -mmmx -ffast-math -fomit-frame-pointer
> -pipe" as CFLAGS (and CXXFLAGS), and I wonder if -mmmx may be omited. The
> actual question is, does -march=xxx includes mmx, mmx2, 3dnow, 3dnow2, sse
> and sse2 for appropriate arch? And what to use as CFLAGS for my Celeron
> 300A (Mendocino)? Thanx a lot. :o)

There's quite a bit of discussion on this in the forums, although it's quite 
hard to find (among the many many pages in each forum). Basically, -march 
doesn't add -mmx when using gcc 3.2. However, that's because gcc 3.2 doesn't 
really support the extensions. If you do add it, gcc adds -mno-mmx without 
telling you. Adding it with gcc 3.3 works, but I believe -march will add it 
where appropriate, anyway.

Regards,
Jason


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] CFLAGS in make.conf

2003-08-20 Thread Luis Morales
Take a look here

http://www.freehackers.org/gentoo/gccflags/flag_gcc3opt.html

Now the others flag  mmx, mmx2, 3dnow, 3dnow2, etc you must be setting 
on USE clausule.

Regards,

LM

Meka[ni] wrote:

I'm using "-O3 -march=pentium2 -mmmx -ffast-math -fomit-frame-pointer -pipe" 
as CFLAGS
(and CXXFLAGS), and I wonder if -mmmx may be omited. The actual question is, does
-march=xxx includes mmx, mmx2, 3dnow, 3dnow2, sse and sse2 for appropriate arch? And 
what
to use as CFLAGS for my Celeron 300A (Mendocino)? Thanx a lot. :o)

Meka[ni]
--
[EMAIL PROTECTED] mailing list


 





--
[EMAIL PROTECTED] mailing list