pkgsrc-Users archive

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

Re: Compiler Optimizations [was Package options dialog]

On Tue, May 08, 2018 at 10:26:42AM -0500, Jason Bacon wrote:
> On 05/08/18 07:06, Joerg Sonnenberger wrote:
> > On Mon, May 07, 2018 at 08:33:54PM -0500, Jason Bacon wrote:
> > > By adding -mfpmath=sse -msse3.  The cpuflags command has so far given me the
> > > same output on every machine I've tried.  I've run a few benchmarks using
> > > plink and
> > > so far have not seen any measurable difference between -march=native and
> > > -mfpmath=sse -msse3 -march=native.
> > It can make a difference on i386, but not necessarily a positive one. It
> > is useless on x86_64.
> > 
> > Joerg
> That would make sense.  Most i386 compilers have SSE off by default in my
> experience.  I've had to force it on in a few cases to get code with
> embedded SSE instructions to build.

That's not really the point. -march=native should already enable SSE and
variants. The -mfpmath=sse part is the problem. Whether or not using the
SSE registers for elementary math depends on a variety of factors. Since
the calling convention still requires passing arguments and return
values via the i87, any function call heavy code will not benefit from


Home | Main Index | Thread Index | Old Index