This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Does SIMD optimization of GCC 3.4.6 work?


This question is not appropriate for the gcc@gcc.gnu.org mailing list.
It would be appropriate on the gcc-help@gcc.gnu.org mailing list.
Thanks.

zhou13@netscape.net 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]