Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Optimizing make.conf for dual pentium 3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Guest
Guest





PostPosted: Sat May 18, 2002 5:49 pm    Post subject: Optimizing make.conf for dual pentium 3 Reply with quote

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





PostPosted: Sun May 19, 2002 3:21 am    Post subject: Reply with quote

MAKEOPTS="-J3 -O3 -mcpu=i686 -march=i686
Back to top
Target
Apprentice
Apprentice


Joined: 25 Apr 2002
Posts: 199

PostPosted: Sun May 19, 2002 9:03 am    Post subject: Reply with quote

You can drop mcpu, too. It's redundant if you're using march.
march sets mcpu implicitly.
Back to top
View user's profile Send private message
Target
Apprentice
Apprentice


Joined: 25 Apr 2002
Posts: 199

PostPosted: Sun May 19, 2002 11:37 pm    Post subject: Reply with quote

-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
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Mon May 20, 2002 1:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum