What are the optimal march & mtune options for gcc for "Pentium4 and higher" processors

My C ++ application (compiled using g ++) should run on Pentium-4 (32-bit) and higher. However, it is commonly used with Core2Duo or better processors.

I am currently using: -march = pentium4 -mtune = pentium4. But some readings made me think that -march = pentium4 -mtune = generic might be better.

Can anyone shed some light on this? What are the optimal values ​​for the march and mtune parameters in this case?

Platform: GCC 4.1.2 on RHEL 5.3 (32-bit).

+4
source share
1 answer

This will be -march=pentium4 -mtune=core2 , as can be seen in the GCC manual .

+5
source

All Articles