View previous topic :: View next topic |
Author |
Message |
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
Posted: Sat May 27, 2006 3:05 am Post subject: I want to change my mcpu setting, what else do I need to do? |
|
|
I just realised that when I set this computer up AGES ago, I used -mcpu=i386 instead of -mcpu=pentium2. If I change it, what should I do afterwards. I assume revdep-rebuild(?). Is there anything else? |
|
Back to top |
|
|
SAngeli l33t
Joined: 16 Apr 2004 Posts: 904 Location: Italy
|
Posted: Sat May 27, 2006 4:32 am Post subject: |
|
|
On top of my head you should rebuild your toolkit. Meaning you should emerge glibc binutils gcc portage
Then you should emrge -e system too.
Why? I assume because all your packages have been compiled with i386 cpu settings rather than pentium2.
This is what I would.
Spiro |
|
Back to top |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
Posted: Sat May 27, 2006 4:44 am Post subject: |
|
|
Sounds reasonable.
cheers mate |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Sat May 27, 2006 9:02 am Post subject: |
|
|
You don't have to do anything. |
|
Back to top |
|
|
SAngeli l33t
Joined: 16 Apr 2004 Posts: 904 Location: Italy
|
Posted: Sun May 28, 2006 5:45 am Post subject: |
|
|
Hi Genone,
could you please explain your reason for not doing anything? As far as I know, toolkit is compiled based on make.conf settings. Whywould you advice not to do anything if toolkit is then used to compile other apps?
Please explain.
Thanks,
Spiro |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Sun May 28, 2006 7:07 am Post subject: |
|
|
Because -mcpu settings don't really affect anything, it's just minor local optimization. Same for most other CFLAGS. Recompiling something with an "optimized" toolchain in this case doesn't change anything. |
|
Back to top |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
Posted: Sun May 28, 2006 9:13 am Post subject: |
|
|
Ok. Maybe I'll emerge -e world next time I update this computer. Its a bit much recompiling all 400 or so packages that are on this computer.
So, Genome, what do you think is the percentage preformace increase from going from i386 to pentium2. Less than 1? |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Sun May 28, 2006 9:19 am Post subject: |
|
|
As always this depends on the app and how exactly gcc performs the optimization (like using alternate code paths which could speed things up quite a bit).
My main point was that CFLAGS generally only have local effects, they won't change the IO behavior (doesn't matter if the toolchain was compiled with -mcpu=i386 or -mcpu=686, it will still output the exact same binary). |
|
Back to top |
|
|
sugar Guru
Joined: 07 Aug 2004 Posts: 579 Location: Morrinsville, New Zealand
|
Posted: Mon May 29, 2006 8:10 am Post subject: |
|
|
Genone wrote: | As always this depends on the app and how exactly gcc performs the optimization (like using alternate code paths which could speed things up quite a bit).
My main point was that CFLAGS generally only have local effects, they won't change the IO behavior (doesn't matter if the toolchain was compiled with -mcpu=i386 or -mcpu=686, it will still output the exact same binary). |
Ok, I see what you're saying. Thanks for the reply :) |
|
Back to top |
|
|
RedBeard0531 Guru
Joined: 21 Sep 2002 Posts: 415 Location: maryland
|
Posted: Mon May 29, 2006 3:34 pm Post subject: |
|
|
While rebuilding gcc and binutils would be silly, you might want to rebuild glibc. Because everything links to it if it gets faster so do your programs. However, dont expect a noticeable difference, especially with -mcpu. You might want to consider using -march=pentium2 which allows it to use the enhanced i686 instruction set. Still will probably be only a few percent (aka unnoticeably) faster.
PS- since you are using a p2 im guessing you dont have much ram or a fast hard-drive. If this is the case you will get better performance with -Os than -O2 or -O3 because of the smaller binaries. _________________ OH MY GOD! Kenny just killed Kenny!
That Basterd! |
|
Back to top |
|
|
|