[MPlayer-dev-eng] [PATCH] configure: -mtune=generic for runtime CPU detection
zuxy.meng at gmail.com
Tue Apr 3 14:49:01 CEST 2007
2007/4/3, Guillaume Poirier <gpoirier at mplayerhq.hu>:
> Diego Biurrun wrote:
> > On Fri, Mar 30, 2007 at 11:13:28AM +0800, Zuxy Meng wrote:
> >>gcc 4.2.0 (currently in rc1 stage) will support "generic"
> >>optimization, which promises to deliver optimal performance on a
> >>collection of "comtemporary" CPUs (now including AMD Athlon, AMD
> >>Opteron, Intel Pentium M, Intel Pentium 4 and Intel Core 2). This
> >>patch add this feature for mplayer, falling back to i686 for older
> > What happens on older CPUs?
> I assume it's just sub-optimal.... but talking about optimal code with
> gcc is like believing in the existence of unicorns ;-)
OK I misunderstood Diego:-) According to gcc guys -mtune=generic is
mainly for binary distributes and targets common CPUs in today's
market, enabling optimizations that benefit one or two while won't
hurt others, at the expense of a bit larger code size. For older CPUs
(pentium? K6? that are not in the targets' list) I see gurantee
whether it'll do better than i686 or not; but for modern CPUs (k7/8,
pentium4, etc.) the results (as been provided by the dev who
implemented this feature) are quite optimal. GCC devs also suggest
using this option with CPUs that gcc doesn't do specific scheduling
for, e.g. Yonah.
Pls refer to http://gcc.gnu.org/ml/gcc-patches/2006-01/msg01045.html
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
More information about the MPlayer-dev-eng