Questions about march/mcpu/mattr and good generic defaults

Mikko Ronkainen mikoro at iki.fi
Thu Dec 19 15:28:48 PST 2013


Do -m32/m64 just mean -march=x86/x86-64? Or do they something 
else too?

To create a generic 32-bit program, are these sane choices:

-m32 -mcpu=i686 -mattr=sse2 ?

I see 100% performance increase between sse2 and sse/none. 
Optimizer seems to like quite a lot.

And with 64-bit:

-m64 -mcpu=x86_64 -mattr=avx ?

Not sure about the avx though, doesn't seem to help my program 
anymore than sse2.


More information about the digitalmars-d-ldc mailing list