Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CFLAGS - Qualche consiglio?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
AlbertoSSj
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2004
Posts: 135

PostPosted: Wed Dec 01, 2004 5:29 pm    Post subject: CFLAGS - Qualche consiglio? Reply with quote

Stavo cercando qualche info sulle flag che era meglio usare, alla fine sono incappato in questo sito taiwanese (andateci :D) dove consigliano:
Code:

CFLAGS="-Os -mcpu=athlon-xp -march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse
-pipe -finline-functions -falign-jumps=4 -falign-loops=4 -falign-functions=64
-funroll-loops -fforce-addr -fomit-frame-pointer -frerun-cse-after-loop
-frerun-loop-opt -fexpensive-optimizations -fPIC"


Io adesso starei a :oops:
Code:

CFLAGS="-march=athlon-xp -pipe -O2"


Alcune di queste le ho capite:
-mcpu=athlon-xp -march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse -pipe

Per le altre c'è qualche posto dove posso trovare una spiegazione dettagliata?
Qualcuna di queste è rischiosa?

Il mio processore è un Athlon Xp barton 3000+

tnk
:wink:
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Wed Dec 01, 2004 6:17 pm    Post subject: Reply with quote

il posto dove trovare ogni delucidazione è
Code:
man gcc

Anche se forse ne trovi anche troppa!

io uso
Code:
CFLAGS="-O2 -march=athlon-xp -mmmx -msse -m3dnow -fomit-frame-pointer -pipe"

e non ho mai capito se mmmx, msse, m3dnow siano ridondanti (perchè già comprese nel march) oppure no, per cui le metto per sicureszza

c'è chi dice che ffast-math dia un boost di velocità apprezzabile, ma non mi fido. Le altre servono più o meno a nulla (a meno che tu non sia in grado di apprezzare scale di tempo per me incomprensibili).
Il grosso lo fanno march e O2
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne


Last edited by Cazzantonio on Wed Dec 01, 2004 6:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
Josuke
Veteran
Veteran


Joined: 07 May 2003
Posts: 1175
Location: Italy - Bolzano

PostPosted: Wed Dec 01, 2004 6:17 pm    Post subject: Reply with quote

Il mio consiglio..dettato dalla esperienza su pelle...è che essere troppo aggressivi con le flags risulta spesso sconveniente per il sistema...vuoi per rischio di errori di compilazione vuoi per binari troppo grandi vuoi per aumenti di velocità impercettibili...vuoi perchè moltissime flags sono ridondanti..usavo anche io stringhe di flags infinite...ora mi trovo benissimo con queste
Code:
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"

_________________
fletto i muscoli...e sono nel vuoto
Back to top
View user's profile Send private message
AlbertoSSj
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2004
Posts: 135

PostPosted: Wed Dec 01, 2004 6:54 pm    Post subject: Reply with quote

Capit :D

Grazie
Back to top
View user's profile Send private message
Tùrin_Mormegil
Guru
Guru


Joined: 21 Sep 2004
Posts: 478
Location: Gorizia - Milano

PostPosted: Wed Dec 01, 2004 7:01 pm    Post subject: Reply with quote

io uso queste:

make.conf wrote:


CFLAGS="-O3 -march=athlon64 -pipe -fomit-frame-pointer -funroll-loops -ffast-math"
CHOST="x86_64-pc-linux-gnu"


_________________
Как я рад!
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Wed Dec 01, 2004 7:18 pm    Post subject: Reply with quote

Tùrin_Mormegil wrote:
io uso queste:

make.conf wrote:


CFLAGS="-O3 -march=athlon64 -pipe -fomit-frame-pointer -funroll-loops -ffast-math"
CHOST="x86_64-pc-linux-gnu"



Sapevo che dandovi quel link avrei fatto dei danni.... :D :D :D
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Wed Dec 01, 2004 7:40 pm    Post subject: Reply with quote

[OT]
@Tùrin_Mormegil : io davverso ti sconsiglio di utilizzare quelle CFLAGS per il tuo sistema.. forse faresti meglio ad andare su quanlcosa di piu safe e che non incrementi tanto i binari...
A conferma di questo ti rimando al topic che avrai gia' letto:
from https://forums.gentoo.org/viewtopic.php?t=257417

Io sto ricompilando tutto ora con:

CFLAGS="-march=athlon64 -O2 -fweb -frename-registers -ftracer -pipe"


[/OT]


Ciao!
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Wed Dec 01, 2004 8:03 pm    Post subject: Reply with quote

daccordissimo con lavish
Le cflags troppo spinte rendono estremamente instabile il sistema.

Un discorso che magari ti può interessare è l'uso -Os al posto di -O2
-Os dovrebbe creare binari più piccoli rispetto a -O2 per cui il tempo di caricamento di tali programmin dovrebbe essere ridotto.
D'altra parte, essendo meno ottimizzati magari impiegano più tempo nell'esecuzione...
stessa discorso se si paragona -O2 a -O3
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
Tùrin_Mormegil
Guru
Guru


Joined: 21 Sep 2004
Posts: 478
Location: Gorizia - Milano

PostPosted: Wed Dec 01, 2004 8:04 pm    Post subject: Reply with quote

ti riferisci a -funroll-loops? a me è stato consigliato qualche mese fa per incrementare un tantinello le prestazioni degli eseguibili... non capisco dove sia il problema :?:
_________________
Как я рад!
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Wed Dec 01, 2004 8:47 pm    Post subject: Reply with quote

Tùrin_Mormegil wrote:
ti riferisci a -funroll-loops? a me è stato consigliato qualche mese fa per incrementare un tantinello le prestazioni degli eseguibili... non capisco dove sia il problema :?:


Guarda qui.. vedrai che nn sempre e' cosi' vero ;) http://www.anthrofox.org/code/mame/xmame64_bench88.html


@ cazzantonio -Os non si puo' usare su amd64
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
Tùrin_Mormegil
Guru
Guru


Joined: 21 Sep 2004
Posts: 478
Location: Gorizia - Milano

PostPosted: Wed Dec 01, 2004 9:14 pm    Post subject: Reply with quote

ho letto più attentamente i posts che mi hai consigliato, anche i bench... ma mi pare che il calo di prestazioni sia tale solo con alcune applicazioni... mentre con altre ci sia un incremento delle prestazioni...
boh :) magari la prossima volta che compilo gcc me lo pacchettizzo e faccio i miei bench :D
_________________
Как я рад!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) 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