View previous topic :: View next topic |
Author |
Message |
mansniks Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Nov 2007 Posts: 290
|
Posted: Sat Apr 05, 2008 7:09 pm Post subject: Generic amd64 CHOST & CFLAGS? |
|
|
Hello,
I'm interested in choosing such CHOST and CFLAGS in my make.conf, that I can run my OS copies on AMD Athlon64 X2 and on some Opterons too. What would those variables be and how much of performance can I loose? Is it even worth to choose other but most general instruction sets nowdays? How about running same OS on both AMD and intel 64 bit?
The thing is - I did optimized for prescott once, but when I had to move things to p-m, it took so much recompile... Uhhh. And I don't really know if it was work that time and work. Gentoo was once best because of optimization, but is it still?
Thanks for advice! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sadako Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/2074682074aea79062b33b.jpg)
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sat Apr 05, 2008 8:17 pm Post subject: |
|
|
-march= k8, opteron, athlon64, athlon-fx are all the exact same thing, you shouldn't have any issues running the same 64-bit binaries on any amd x86_64 cpu (unless you add -msse3 yourself, which the older cpu's don't support).
For amd and intel compatibility, yuo'll need to stick with -march=x86-64, you may be able to add some -mmmx and -msse flags (which are ommon to both), the gcc docs don't seem to list the extensions enabled by -march=x86-64... _________________ "You have to invite me in" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mansniks Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Nov 2007 Posts: 290
|
Posted: Sun Apr 06, 2008 7:07 am Post subject: |
|
|
Ok, but how about performance decrease on, say Athlon, if I choose x86-64? Is it considerably worse? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sadako Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/2074682074aea79062b33b.jpg)
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sun Apr 06, 2008 7:14 am Post subject: |
|
|
mansniks wrote: | Ok, but how about performance decrease on, say Athlon, if I choose x86-64? Is it considerably worse? | Considerably?
I seriously doubt it would be even remotely noticeable...
All your really losing is 3dnow support.
You could use -mtune, ie "-O2 -march=x86-64 -mtune=k8 -pipe", then it would be "optimized" for all the amd 64 bit cpu's, but the binaries would still run just fine on intel's chips. _________________ "You have to invite me in" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mansniks Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Nov 2007 Posts: 290
|
Posted: Sun Apr 06, 2008 3:42 pm Post subject: |
|
|
Ok, I already choose x86-64. Ridiculous discussion about avatar by the way ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
i92guboj Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/5913531844c4d36a8e43f9.jpg)
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sun Apr 06, 2008 4:25 pm Post subject: |
|
|
mansniks wrote: | Ok, but how about performance decrease on, say Athlon, if I choose x86-64? Is it considerably worse? |
You won't notice any performance decrease, even if you used i686. The performance gain obtained from CFLAGS in widely overrated. And it's only *noticeable* in programs that use the extra instructions for anything important (tipical examples: mencoder and blender). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|