Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
march vs mcpu in practical terms for a netbook and a desktop
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
anvesaka
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2002
Posts: 138
Location: Toledo, Spain

PostPosted: Thu Feb 28, 2013 4:04 pm    Post subject: march vs mcpu in practical terms for a netbook and a desktop Reply with quote

Hello,

I've got a small netbook with an AMD C-60 CPU. This CPU is really slow in comparison with actual i5 processors, and programs today are getting big.
So I want to share the system in my desktop with this machine.
Well, the question is that I want it to be super-optimized. I want to get the most out of this little chip, in preference over the desktop (wich is already fast).
But because bassically the same system is going to run both on an i5 desktop and on the netbook, I'd like to know what the optimus CFLAGS could be.
I was thinking in the following ones:

Code:
 -O2 -mtune=btver1 test.c -finline-functions --param l1-cache-size=32 --param l2-cache-size=512


As you can see, the cache is really small in this processor, so I'm in doubt of two things:
    Do you recommend Os over O2?
    Is there any big significant difference in performance between mtune and march in practical terms?


I make the second question just because I don't want to compile the ebuilds two times every time (one for the desktop and another for the netbook). I just want to use rsync and keep both systems mostly identical.

What do you think?
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Thu Feb 28, 2013 4:51 pm    Post subject: march=native Reply with quote

march=native
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54238
Location: 56N 3W

PostPosted: Thu Feb 28, 2013 5:05 pm    Post subject: Reply with quote

anvesaka,

-mtune, with no -march orders the binary code to suit to processor in mtune.
-march may use the capabilities of the processor and break compatibility with other CPUs.
-march also implies -mtune.

You might want to use distcc so your i5 does most of the building for you AMD C-60.
To do that, find out what -march=native really means and put the expanded form in yout C60 CFLAGS.

Install distcc on both systems, start distccd on the i5.
Add distcc to your FEATURES on the C-60

If you have set up distcc pump mode, run
Code:
pump emerge <package>
and have the i5 do a lot of the work.
You must use identical versions of gcc on both systems.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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