Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-performance
Lists: gentoo-performance: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-performance@g.o
From: Paul de Vrieze <pauldv@g.o>
Subject: Re: performance testing
Date: Thu, 10 May 2007 14:37:47 +1000
Miguel Sousa Filipe wrote:
> A good CFLAGS would be something not very agressive, something like:
> -march=<cpuType> -O3 or -O2 and at most -fomit-frame-pointer.
> (Scientific workloads can speedup considerably with: -ffast-math)

You must be careful on cpuflags. -ffast-math should never be used 
globally. Applications that benefit from it specify it themselves. The 
most realistic is -O2.

The remark about processors being optimized for i386 is a bit off beat. 
Actually what -march does is enable additional instructions to be used 
that are faster (and available) on those processors. Especially mmx{,2}, 
sse{,2,3} are very beneficial to certain kinds of applications, and can 
give big speedups. Considering that, however, many applications that are 
sensitive to this such as mplayer can do run-time cpu detection and use 
different code (often written in assembler) depending on the cpu at runtime.

In general it is not wise to use -O3. Most distributions compile with 
-O2. -O3 therefore is less well tested and may expose bugs in both the 
compiler and (more importantly) the applications.

Besides the instructions that are available to the compiler (influenced 
by -march) there is then the issue of instruction scheduling. To put it 
simply, all modern processors have the possibility to process multiple 
instructions in parallel when they do not conflict. The precise 
architectures of this differ and the ability to parallelize depends 
quite much on the scheduling of the instructions. This is influenced by 
the -mtune flag (set implicitly by -march). This is an optimization that 
is most likely also present in a binary distribution. Gentoo can however 
optimize to the precise processor used.


gentoo-performance@g.o mailing list

performance testing
-- Peter A. H. Peterson
Re: performance testing
-- Miguel Sousa Filipe
Lists: gentoo-performance: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: performance testing
Next by thread:
Speeding up program starts with squashfs
Previous by date:
Re: Speeding up program starts with squashfs
Next by date:
Re: performance testing

Updated Jun 17, 2009

Summary: Archive of the gentoo-performance mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.