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]

GCC-3.2.1 behavior on p3/p4


Hi,
	
I am trying to optimize a C code with the use of MMX 64-bit instructions on BSD 4.7, The compiler which I am using is g++ 3.2.1. Now there is a strange behavior of the code generated by the compiler on different targets. If I run the code on Pentium-3 650 MHz machine, the 64-bit code runs faster than its equivalent C implementation. But if I run the same code on Pentium-4 1.6 GHz machine the C implementation runs faster than the 64-bit implementation. The code does not contain any floating point operation.

The compiler options which I am using are:
g++ -msse -O3 (in case of 64-bit implementation)
g++ -O3 (in case of C implementation)

Is there any specific option for the compiler to generate optimized code for P4 ?? Can someone clarify this strange behavior?? I have also tried -march=pentium4 option.

Regards,
Pramod


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