View previous topic :: View next topic |
Author |
Message |
Guest Guest
|
Posted: Sat May 18, 2002 5:49 pm Post subject: Optimizing make.conf for dual pentium 3 |
|
|
Hello,
I was hoping someone could tell me what I could do to make.conf to get the best performance out of the programs compiled on my dual p3 system..
Looked a bit around the net and I think MAKEOPTS="-J3 -O -mcpu=i686 -march=i686" will work for me ? or not.. advice anyone ?
Thanks in advance.
Regards,
Eonic |
|
Back to top |
|
|
one change to setting Guest
|
Posted: Sun May 19, 2002 3:21 am Post subject: |
|
|
MAKEOPTS="-J3 -O3 -mcpu=i686 -march=i686 |
|
Back to top |
|
|
Target Apprentice
Joined: 25 Apr 2002 Posts: 200
|
Posted: Sun May 19, 2002 9:03 am Post subject: |
|
|
You can drop mcpu, too. It's redundant if you're using march.
march sets mcpu implicitly. |
|
Back to top |
|
|
Target Apprentice
Joined: 25 Apr 2002 Posts: 200
|
Posted: Sun May 19, 2002 11:37 pm Post subject: |
|
|
-O3 turns on almost all optimizations, save some that cause a size/speed tradeoff or can break standards, like the following:
-funroll-loops
This does much like it says... it "unrolls" fixed-length loops to eliminate some counters and JMP instructions. It results in a small speed boost at the cost of larger binaries. There's also -funroll-all-loops, but don't use it because it tries to unroll variable-length loops and this will actually slow things down.
-ffast-math
Disables some safeguards like checking for negative numbers being sqrt()'ed in order to increase execution speed. This can break programs that aren't too careful about such things and rely on the compiler to include such checks.
-fstrict-aliasing
This makes assumptions about which data types can be aliased to which to speed up code, but some things can break. The programmer is expected to know what they're doing.
eg:
An integer/double union variable can be accessed as either type despite which one it's currently holding, and will still give you a valid number. You can even do this through a pointer.
However with strict-aliasing on, you lose the ability to do this with pointers because an int* can't be aliased to a double* or vise-versa. Any programs making use of such a construct will probably segfault or worse when they attempt to do this while -fstrict-aliasing optimized. |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Mon May 20, 2002 1:35 am Post subject: |
|
|
You might consider using -j4 if you have plenty of RAM. The extra job keeps both of my cpu's running around 90% while compiling. You've got to love SMP when it's time to build big stuff. |
|
Back to top |
|
|
|