This question is not appropriate for the gcc@gcc.gnu.org mailing list.
It would be appropriate on the [EMAIL PROTECTED] mailing list.
Thanks.

[EMAIL PROTECTED] writes:

> I am wondering if i have used -O, -O2 or -O3, do i still benifit from 
> flags such as -march -fmpmath -ffast-math -mmx -sse -sse2 -3dnow?

Yes, although the effects will depend on your code.  In particular
those options will mainly affect floating point code.  And you may
want to use -mtune as well.

> I am optimizing a video codec and i see barely any performance 
> difference whether i use just -O2 or "-ffast-math -march=athlon-xp 
> -mmmx -msse -msse2 -m3dnow -mfpmath=sse,387 -O3".

I recommend approaching this as you would any performance problem: use
a profiler to identify the slowest parts of your code, and see what
you can do to make them faster.  It may be helpful to look at the
generated assembly code: compile with the --save-temps option and look
at the .s file.

Ian

Reply via email to