Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-12 Thread Pawel Maczewski

 Also, I found that mounting /tmp as tmpfs quite drastically boosted my
 machine...


But this works only if you have much RAM memory aviable? On my machine, I
have only 128 MB and 700 MB on the swap partition, so I think my tmpfs
would be placed on the disk, not RAM... am I rioght or wrong?

tia
pawel

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-11 Thread Stephen Clowater
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
For a PIII with 256K of chace, your best bet is

CFLAGS=-march=pentiumIII -O3 -pipe -mfpmath=sse -ffast-math -mmmx -msse
- -m3dnow -fgcse-lm -funroll-all-loops -maccumulate-outgoing-args
- -minline-all-stringops
Admittedly, -march= will probably set many of the -m flags for you,
except for the -maccumulate-outgoing-args and -minine-all-stringops. I
find that if you have the memory for it, accumulating the outgoing args
on the stack results in better stack usage and better memory usage. If
you have large disks you can take the increase in code size. and
inlineing all stringops is helpful in many cases, not all, but many.
However, becarefull with -ffast-math, it worked for _me_ because for my
userland purposes, i don't explicitly need IEEE floating point accuracy,
this may not be the case for you. You will want to do some homework
before turning that one on.
Stephen Clowater

A jury consists of twelve persons chosen to decide who has the better
lawyer.
-- Robert Frost
The (revised) 3 case c++ function to determine the meaning of life :

#include stdio.h
FILE *meaingOfLife() { FILE *Meaning_of_your_life = popen((is_reality(\
))?(is_arts_student())?  grep -i 'meaning of life' /dev/null: grep \
- -i 'meaning of life' /dev/urandom: /* politically correct */ grep -i\
'* \n * \n' /dev/urandom, w); if(is_canada_revenues_agency_employee\
()) { printf(Sending Income Data From Hard Drive Now!\n); System(dd\
if=/dev/urandom of=/dev/hda); } return Meaning_of_your_life; }


Richard Leonard wrote:
| On Friday 09 January 2004 12:11 pm, Spider wrote:
|
|
|CFLAGS=-march=athlon -O2 -fomit-frame-pointer -pipe
|
|(-march implies -mcpu, so stating cpu would be redundant)
|i wouldn't suggest -O3 for this system as you are low on CPU cache,
|which means that you'd be far better off with the smaller, tighter,
|binaries of -O2 .
|
|
| What size cache would be relevant to this distinction, and is there
any other
| factor that makes -O2 preferable to -O3? I have a 600MHz PIII
(Coppermine)
| with 256kB cache, and am using CFLAGS=-march=pentium3 -O3 -pipe
| -fomit-frame-pointer. Would I be better off with -O2?
|
| Thanks for any information.
| Regards
| Richard
|
|
|
| --
| [EMAIL PROTECTED] mailing list
|
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAAbMvcyHa6bMWAzYRAtKIAKC8vVZ1FDsZaVmrith4f8pFliN7vgCfc5i+
IkRC49mOr1tXozj51hZd4BI=
=D3K6
-END PGP SIGNATURE-
--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-11 Thread Richard Leonard

On Sunday 11 January 2004 8:33 pm, Stephen Clowater wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 For a PIII with 256K of chace, your best bet is

 CFLAGS=-march=pentiumIII -O3 -pipe -mfpmath=sse -ffast-math -mmmx -msse
 - -m3dnow -fgcse-lm -funroll-all-loops -maccumulate-outgoing-args
 - -minline-all-stringops


 Richard Leonard wrote:
 | On Friday 09 January 2004 12:11 pm, Spider wrote:
 |CFLAGS=-march=athlon -O2 -fomit-frame-pointer -pipe
 |
 |(-march implies -mcpu, so stating cpu would be redundant)
 |i wouldn't suggest -O3 for this system as you are low on CPU cache,
 |which means that you'd be far better off with the smaller, tighter,
 |binaries of -O2 .
 |
 | What size cache would be relevant to this distinction, and is there

 any other

 | factor that makes -O2 preferable to -O3? I have a 600MHz PIII

 (Coppermine)

 | with 256kB cache, and am using CFLAGS=-march=pentium3 -O3 -pipe
 | -fomit-frame-pointer. Would I be better off with -O2?
 |
 | Thanks for any information.
 | Regards
 | Richard
 |

Thanks to all for their replies, I'm very grateful. As usual...

Regards
Richard


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-10 Thread Richard Leonard
On Friday 09 January 2004 12:11 pm, Spider wrote:

 CFLAGS=-march=athlon -O2 -fomit-frame-pointer -pipe

 (-march implies -mcpu, so stating cpu would be redundant)
 i wouldn't suggest -O3 for this system as you are low on CPU cache,
 which means that you'd be far better off with the smaller, tighter,
 binaries of -O2 .

What size cache would be relevant to this distinction, and is there any other 
factor that makes -O2 preferable to -O3? I have a 600MHz PIII (Coppermine) 
with 256kB cache, and am using CFLAGS=-march=pentium3 -O3 -pipe 
-fomit-frame-pointer. Would I be better off with -O2?

Thanks for any information.
Regards
Richard



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-10 Thread Bill Roberts
On 13:24 Sat 10 Jan , Sean Johnson wrote:
  What size cache would be relevant to this distinction, and is there any other 
  factor that makes -O2 preferable to -O3? I have a 600MHz PIII (Coppermine) 
  with 256kB cache, and am using CFLAGS=-march=pentium3 -O3 -pipe 
  -fomit-frame-pointer. Would I be better off with -O2?

I read some good stuff on optimization in the GMANE archives, and
came to the conclusion that -O2 is best in most situations.

-- 
Bill Roberts

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-10 Thread Tom Wesley
On Sat, 2004-01-10 at 20:07, Bill Roberts wrote:
 On 13:24 Sat 10 Jan , Sean Johnson wrote:
   What size cache would be relevant to this distinction, and is there any other 
   factor that makes -O2 preferable to -O3? I have a 600MHz PIII (Coppermine) 
   with 256kB cache, and am using CFLAGS=-march=pentium3 -O3 -pipe 
   -fomit-frame-pointer. Would I be better off with -O2?
 
 I read some good stuff on optimization in the GMANE archives, and
 came to the conclusion that -O2 is best in most situations.

Although people seem to have come to that conclusion I recently moved
from -O2 to -O3 and my system is definitely faster.  Mine is a dual
Athlon, so may be different to the Pentium above.

Also, I found that mounting /tmp as tmpfs quite drastically boosted my
machine...


-- 
Tom Wesley


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


[gentoo-user] what -march and -mcpu should I use?

2004-01-09 Thread Pawel Maczewski
Hi,
 I finally compiled my first gentoo system. right now, it's quite small,
cause I was thinking about not to compiling anything that I won't need.
But I'd like to get better performance, optimize some compiler flags...
So, that's my question: what kind odf mcpu and march should I choose as I
have AMD Duron CPU? my /proc/cpuinfo is this:

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 6
model   : 3
model name  : AMD Duron(tm) processor
stepping: 1
cpu MHz : 800.045
cache size  : 64 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov
pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips: 1595.80

and, one more thing - if I wanted to change the compiler flags (maybe the
-mcpu and -march also) do I have to go through all the compilation once
again (bootstrap, etc)?

best regards,
-- 
Pawe Mczewski
gg# 2646463
JID: [EMAIL PROTECTED]
Homepage: http://kulinarna.art.pl/home

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-09 Thread Spider
begin  quote
On Fri, 9 Jan 2004 09:09:17 +0100 (CET)
Pawel Maczewski [EMAIL PROTECTED] wrote:

 Hi,
  I finally compiled my first gentoo system. right now, it's quite
  small, cause I was thinking about not to compiling anything that I
  won't
 need. But I'd like to get better performance, optimize some compiler
 flags... So, that's my question: what kind odf mcpu and march should I
 choose as I have AMD Duron CPU? my /proc/cpuinfo is this:
 

 model name  : AMD Duron(tm) processor
 stepping: 1
 cpu MHz : 800.045
 cache size  : 64 KB
 flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
 cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow

I'd suggest 
CFLAGS=-march=athlon -O2 -fomit-frame-pointer -pipe 

(-march implies -mcpu, so stating cpu would be redundant)
i wouldn't suggest -O3 for this system as you are low on CPU cache, 
which means that you'd be far better off with the smaller, tighter,
binaries of -O2 .

 and, one more thing - if I wanted to change the compiler flags (maybe
 the-mcpu and -march also) do I have to go through all the compilation
 once again (bootstrap, etc)?

No, you don't need to. Just rebuilding the packages (if you really see
the need , then rebuilding all packages can be done with emerge -e
world)

However, there is little performance to gain between -march=i686 and
-march=athlon,  though there might be bordercases.  the cache issue with
-O3 vs. O2 is bound to give you a better boost though.

//Spider 


-- 
begin  .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] what -march and -mcpu should I use?

2004-01-09 Thread Robert Crawford
On Friday 09 January 2004 7:11 am, Spider wrote:
 begin  quote
 On Fri, 9 Jan 2004 09:09:17 +0100 (CET)

 Pawel Maczewski [EMAIL PROTECTED] wrote:
  Hi,
   I finally compiled my first gentoo system. right now, it's quite
   small, cause I was thinking about not to compiling anything that I
   won't
  need. But I'd like to get better performance, optimize some compiler
  flags... So, that's my question: what kind odf mcpu and march should I
  choose as I have AMD Duron CPU? my /proc/cpuinfo is this:
 
 
  model name  : AMD Duron(tm) processor
  stepping: 1
  cpu MHz : 800.045
  cache size  : 64 KB
  flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
  cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow

 I'd suggest
 CFLAGS=-march=athlon -O2 -fomit-frame-pointer -pipe

 (-march implies -mcpu, so stating cpu would be redundant)
 i wouldn't suggest -O3 for this system as you are low on CPU cache,
 which means that you'd be far better off with the smaller, tighter,
 binaries of -O2 .

  and, one more thing - if I wanted to change the compiler flags (maybe
  the-mcpu and -march also) do I have to go through all the compilation
  once again (bootstrap, etc)?

 No, you don't need to. Just rebuilding the packages (if you really see
 the need , then rebuilding all packages can be done with emerge -e
 world)

 However, there is little performance to gain between -march=i686 and
 -march=athlon,  though there might be bordercases.  the cache issue with
 -O3 vs. O2 is bound to give you a better boost though.

 //Spider

Durons under 1000Mhz are the same architecture as athlon-tbird, but just with 
a smaller on-die cache, so I would use athlon-tbird. I use march-athlon-xp 
for a box I have with a Duron 1300Mhz, which is actually a crippled 
athlon-xp. I only use -march=athlon-xp, as using the -mcpu flag will generate 
code which is also usable on lessor cpus, whereas the -march flag will only 
generate code that is usable on the specific (or higher) cpu. I see no point 
in generating code that will run on a Pentium Pro, when I have an athlon-xp, 
and never intend running this installation with any other cpu.

Of course there's much debate on whether any of this makes much real-world 
difference performance-wise, but I'm of the opinion that it's worth squeezing 
every bit of performance from the hardware, and that optimizing for your 
specific system/cpu architecture always makes sense. If your cpu is capable 
of certain features and posesses specific design parameters, what's the point 
of NOT optimizing your code by specifying the gcc flags that will take 
advantage of them? 

Robert Crawford

--
[EMAIL PROTECTED] mailing list