Re: amd64 arch and optimization flags?
On 06.02.2014 00:39, Jaromír Mikeš wrote:
>
> Hi all,
>
> I would like to add some optimization flags for amd64 arch in some
> packages (mostly LV2 nad LADSPA plugins).
> I found these as candidates for amd64 arch:
>
> -msse
> -msse2
> -mfpmath=sse
this is enabled by default on amd64
> -ffast-math
this is dangerous it changes results, sometimes significantly (e.g. for
complex numbers), only use if you don't care about correctness or have
verified its still correct.
> -ftree-vectorize
this does sometimes slow programs down, usually only programs doing
numeric work profit from it, these usually enable it by themselves.
It is enabled by the -O3 optimization level.
it is mostly safe to use if you follow the C standard strictly (i.e. no
unaligned access of aliased variables)
> -mtune=generic
should be the default, but you can safely change that to something else.
generic in gcc < 4.9 is I think pentium4 which is a very old chip.
gcc-4.9 will change the default of it to bulldozer/intel-core btw:
http://gcc.gnu.org/gcc-4.9/changes.html
Reply to: