Re: [gentoo-user-fr] Optimisation
Le
Bernard Stephan
_=_NextPart_001_01C51F2D.A7416F80
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
J'ai lu le fil de discussion en diagonale, mais il me semble que
l'option -s (Remove all symbol table and relocation information from =
the
executable) a été oubliée. Or elle réduit considérablement la =
taille de
l'exécutable.
Il y a peu, cette option n'était pas compatible avec l'option -O3, =
c'est
à dire que gcc -O3 -s se comportait comme gcc -O2 -s. Or depuis peu, =
ce
n'est plus le cas.
J'ai testé ces deux options avec le benchmark de
http://gentoofr.org/article.php3?id_article=59 (petit en taille), et =
-O3
-s est plus rapide que -O2 -s. Or, d'expérience, -O3 -s est bien plus =
petit que -O3 seul, et du même ordre de grandeur que -O2 -s (mais il =
est
vrai que je n'ai pas beaucoup testé sur de très grands =
exécutables --
bienvenu aux retours d'expérience dans ce contexte).
Conclusion perso : CFLAGS="-march=pentium4 -O3 -s -pipe
-fomit-frame-pointer"
--
Stéphan BERNARD
Yoann Pannier wrote:
> NiCoS wrote:
> >>O3 => binaires plus gros => chargements plus long.
> >
> > Hmm est-ce à dire qu'il faudrait compiler en -O2 par ex ou autre =
?
> Quel est
> > l'avantage/l'inconvénient par rapport à -O3 ?
>
> Ca dépend ;)
>
> Je suis loin d'être un expert en la matière, mais disons qu'un =
binaire
> ()
>
> Ma conclusion personnelle, à ma situation personnelle est :
> CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
>
> Voili Voilou, si j'ai dit trop de bêtises, oubliez les !
>
> --
> Yoann Pannier
>
> --
> gentoo-user-fr@gentoo.org mailing list
>
_=_NextPart_001_01C51F2D.A7416F80
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; =
charset=ISO-8859-15">
<META NAME="Generator" CONTENT="MS Exchange Server version =
5.5.2653.12">
<TITLE>Re: [gentoo-user-fr] Optimisation</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>J'ai lu le fil de discussion en diagonale, mais il me =
semble que </FONT>
<BR><FONT SIZE=2>l'option -s (Remove all symbol table and relocation =
information from the </FONT>
<BR><FONT SIZE=2>executable) a été oubliée. Or elle réduit =
considérablement la taille de </FONT>
<BR><FONT SIZE=2>l'exécutable.</FONT>
</P>
<P><FONT SIZE=2>Il y a peu, cette option n'était pas compatible =
avec l'option -O3, c'est </FONT>
<BR><FONT SIZE=2>à dire que gcc -O3 -s se comportait comme gcc -O2 =
-s. Or depuis peu, ce </FONT>
<BR><FONT SIZE=2>n'est plus le cas.</FONT>
</P>
<P><FONT SIZE=2>J'ai testé ces deux options avec le benchmark de =
</FONT>
<BR><FONT SIZE=2><A =
HREF="http://gentoofr.org/article.php3?id...e=59" =
TARGET="_blank">http://gentoofr.org/article.php3?id...</A> =
(petit en taille), et -O3 </FONT>
<BR><FONT SIZE=2>-s est plus rapide que -O2 -s. Or, d'expérience, =
-O3 -s est bien plus </FONT>
<BR><FONT SIZE=2>petit que -O3 seul, et du même ordre de grandeur =
que -O2 -s (mais il est </FONT>
<BR><FONT SIZE=2>vrai que je n'ai pas beaucoup testé sur de très =
grands exécutables -- </FONT>
<BR><FONT SIZE=2>bienvenu aux retours d'expérience dans ce =
contexte).</FONT>
</P>
<P><FONT SIZE=2>Conclusion perso : CFLAGS="-march=pentium4 =
-O3 -s -pipe </FONT>
<BR><FONT SIZE=2>-fomit-frame-pointer"</FONT>
<BR><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Stéphan BERNARD</FONT>
</P>
<P><FONT SIZE=2>Yoann Pannier wrote:</FONT>
</P>
<P><FONT SIZE=2>> NiCoS wrote:</FONT>
<BR><FONT SIZE=2>> >>O3 => binaires plus gros => =
chargements plus long.</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > Hmm est-ce à dire qu'il faudrait =
compiler en -O2 par ex ou autre ? </FONT>
<BR><FONT SIZE=2>> Quel est</FONT>
<BR><FONT SIZE=2>> > l'avantage/l'inconvénient par rapport =
à -O3 ?</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Ca dépend ;)</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Je suis loin d'être un expert en la =
matière, mais disons qu'un binaire</FONT>
<BR><FONT SIZE=2>> ()</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Ma conclusion personnelle, à ma situation =
personnelle est :</FONT>
<BR><FONT SIZE=2>> CFLAGS="-march=pentium4 -O2 -pipe =
-fomit-frame-pointer"</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Voili Voilou, si j'ai dit trop de bêtises, =
oubliez les !</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> -- </FONT>
<BR><FONT SIZE=2>> Yoann Pannier</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> -- </FONT>
<BR><FONT SIZE=2>> gentoo-user-fr@gentoo.org mailing list</FONT>
<BR><FONT SIZE=2>></FONT>
</P>
</BODY>
</HTML>
_=_NextPart_001_01C51F2D.A7416F80--
Content-Type: text/plain;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
J'ai lu le fil de discussion en diagonale, mais il me semble que
l'option -s (Remove all symbol table and relocation information from =
the
executable) a été oubliée. Or elle réduit considérablement la =
taille de
l'exécutable.
Il y a peu, cette option n'était pas compatible avec l'option -O3, =
c'est
à dire que gcc -O3 -s se comportait comme gcc -O2 -s. Or depuis peu, =
ce
n'est plus le cas.
J'ai testé ces deux options avec le benchmark de
http://gentoofr.org/article.php3?id_article=59 (petit en taille), et =
-O3
-s est plus rapide que -O2 -s. Or, d'expérience, -O3 -s est bien plus =
petit que -O3 seul, et du même ordre de grandeur que -O2 -s (mais il =
est
vrai que je n'ai pas beaucoup testé sur de très grands =
exécutables --
bienvenu aux retours d'expérience dans ce contexte).
Conclusion perso : CFLAGS="-march=pentium4 -O3 -s -pipe
-fomit-frame-pointer"
--
Stéphan BERNARD
Yoann Pannier wrote:
> NiCoS wrote:
> >>O3 => binaires plus gros => chargements plus long.
> >
> > Hmm est-ce à dire qu'il faudrait compiler en -O2 par ex ou autre =
?
> Quel est
> > l'avantage/l'inconvénient par rapport à -O3 ?
>
> Ca dépend ;)
>
> Je suis loin d'être un expert en la matière, mais disons qu'un =
binaire
> ()
>
> Ma conclusion personnelle, à ma situation personnelle est :
> CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
>
> Voili Voilou, si j'ai dit trop de bêtises, oubliez les !
>
> --
> Yoann Pannier
>
> --
> gentoo-user-fr@gentoo.org mailing list
>
_=_NextPart_001_01C51F2D.A7416F80
Content-Type: text/html;
charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; =
charset=ISO-8859-15">
<META NAME="Generator" CONTENT="MS Exchange Server version =
5.5.2653.12">
<TITLE>Re: [gentoo-user-fr] Optimisation</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>J'ai lu le fil de discussion en diagonale, mais il me =
semble que </FONT>
<BR><FONT SIZE=2>l'option -s (Remove all symbol table and relocation =
information from the </FONT>
<BR><FONT SIZE=2>executable) a été oubliée. Or elle réduit =
considérablement la taille de </FONT>
<BR><FONT SIZE=2>l'exécutable.</FONT>
</P>
<P><FONT SIZE=2>Il y a peu, cette option n'était pas compatible =
avec l'option -O3, c'est </FONT>
<BR><FONT SIZE=2>à dire que gcc -O3 -s se comportait comme gcc -O2 =
-s. Or depuis peu, ce </FONT>
<BR><FONT SIZE=2>n'est plus le cas.</FONT>
</P>
<P><FONT SIZE=2>J'ai testé ces deux options avec le benchmark de =
</FONT>
<BR><FONT SIZE=2><A =
HREF="http://gentoofr.org/article.php3?id...e=59" =
TARGET="_blank">http://gentoofr.org/article.php3?id...</A> =
(petit en taille), et -O3 </FONT>
<BR><FONT SIZE=2>-s est plus rapide que -O2 -s. Or, d'expérience, =
-O3 -s est bien plus </FONT>
<BR><FONT SIZE=2>petit que -O3 seul, et du même ordre de grandeur =
que -O2 -s (mais il est </FONT>
<BR><FONT SIZE=2>vrai que je n'ai pas beaucoup testé sur de très =
grands exécutables -- </FONT>
<BR><FONT SIZE=2>bienvenu aux retours d'expérience dans ce =
contexte).</FONT>
</P>
<P><FONT SIZE=2>Conclusion perso : CFLAGS="-march=pentium4 =
-O3 -s -pipe </FONT>
<BR><FONT SIZE=2>-fomit-frame-pointer"</FONT>
<BR><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Stéphan BERNARD</FONT>
</P>
<P><FONT SIZE=2>Yoann Pannier wrote:</FONT>
</P>
<P><FONT SIZE=2>> NiCoS wrote:</FONT>
<BR><FONT SIZE=2>> >>O3 => binaires plus gros => =
chargements plus long.</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > Hmm est-ce à dire qu'il faudrait =
compiler en -O2 par ex ou autre ? </FONT>
<BR><FONT SIZE=2>> Quel est</FONT>
<BR><FONT SIZE=2>> > l'avantage/l'inconvénient par rapport =
à -O3 ?</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Ca dépend ;)</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Je suis loin d'être un expert en la =
matière, mais disons qu'un binaire</FONT>
<BR><FONT SIZE=2>> ()</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Ma conclusion personnelle, à ma situation =
personnelle est :</FONT>
<BR><FONT SIZE=2>> CFLAGS="-march=pentium4 -O2 -pipe =
-fomit-frame-pointer"</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Voili Voilou, si j'ai dit trop de bêtises, =
oubliez les !</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> -- </FONT>
<BR><FONT SIZE=2>> Yoann Pannier</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> -- </FONT>
<BR><FONT SIZE=2>> gentoo-user-fr@gentoo.org mailing list</FONT>
<BR><FONT SIZE=2>></FONT>
</P>
</BODY>
</HTML>
_=_NextPart_001_01C51F2D.A7416F80--

Poser une question


Puisque tu as l'air de connaître les CFLAGS, j'ai une question
extrêmement basique à ce sujet: si je change les CFLAGS de make.conf et
que je ne fait rien d'autre, il n'y a aucun danger ? (c'est à dire que
ça n'a aucun effet négatif, et que mon système se remettra petit à petit
à jour)
Quelles packages dois-je recompiler pour en bénéficier au maximum pour
le minimum d'effort ? 'emerge system && revdep-rebuild' ?
Fred
--
Frédéric Grosshans
--
mailing list