Re: GCC optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops.   Gcc 3.2 is able to optimize for P4.

On Wed, 2003-06-11 at 00:07, Jean Francois Martinez wrote:
> On Tue, 2003-06-10 at 08:59, Christos E. Chrisostomidis wrote:
> > Dear all,
> >  
> > Most of the RPM packages shipped with RH9 (and older), come for a i386
> > target.
> >  
> > I am having a pentium 4 box and I am currently using rpmbiuld
> > --rebuild --target i686 to rebuild
> > the SRPMs in order to optimize performance.
> >  
> > I am trying to optimize packages such as sendmail, samba, squid etc.
> 
> First of all before you go into a frenzy of package rebuilding how
> about MEASURING the performance of a CPU intensive benchmark both
> using RedHat default parms (who BTW target the i686 for optim purposes)
> and what you get when compiler is using the same parms than an rpm
> built with --target i686?
> 
> And once you have done that what about EVALUATING if it is worth the
> trouble?
> 
> In case you still go for it there are a couple of caveats:
> 1) Gcc 3.2 does not optimize for the Pentium 4.  It only knows about the
> i686 family (PPro to PIII) who is very different for optimization
> purposes.  In fact you could try to play with other -mcpu= parms since
> it could happen than another CPU has a timetable closer to the PIV than
> the PIII family.  It _could_ happen that your P4 were faster with 
> say, -mcpu=i386 or -mcpu=athlon than with -mcpu=i686.
> 
> 2) Whenever the program enters glibc or kernel you will be gaining
> nothing since RedHat already ships optimized RPMs for these.
> 
> 3) RedHat does not invoke gcc with parms for MMX/SSE instructions since
> the i686 packages are supposed to run on PPro.  I expect them giving a
> real boost on some programs.  However I also expect you run into some
> interesting bugs since this is relatively uncharted territory.  But
> since the only way to debug GCC's MMX/SSE code generation is for people
> using it I strongly encorage you to boldly go where no geek has 
> ventured before.  :-)
> 
> 
> >  
> > I am wondering if I need to specify any gcc/g++ compiler optimization
> > flags, perhaps in the form of an rpmrc file.
> >  
> > If this is the case, does anybody knows a good reference to look at so
> > I can find the appropriate optflags
> > to use ?
> >  
> >  
> > Best Regards
> > Christos
> >  
> >  
> -- 
> Jean Francois Martinez <jfm512@xxxxxxx>
-- 
Jean Francois Martinez <jfm512@xxxxxxx>




[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux