Mike Frysinger wrote: > On Saturday 14 October 2006 04:49, Sebastian Bergmann wrote:
>> CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" > here's a good reason why gentoo-wiki is not official ... this is wrong. the > duo cpu's are not based on the pentium4 which is what the prescott is That was put there by me. The thing is, while the Core CPUs have more in common with the Pentium-M micro-architecture, -march=pentium-m highly favors generating x87 over SSE/SSE2 instructions, since on a Pentium-M doing SSE/SSE2 was somewhere in the neighbourhood of 30% slower. Core chips have improved decoding and use micro-op fusion to combine up to four SSE instructions. Also, with code doing fp to int conversion or single precision division, SSE scalar ops are the win on Core (though not as big as Netburst) since x87 instructions have to write data to memory and read it again to reduce precision. Based on that I've been doing benchmarks with GCC 4.1 and trunk and I usually find '-march=prescott -mfpmath=sse' to do a bit better than '-march=pentium-m -mfpmath=sse -msse3', and just plain '-march=prescott' to be near identical to plain '-march=pentium-m' (for those ebuilds that call strip-flags ;), though the latter is on average <=1% faster. '-march=pentium-m -msse3' has actually been the worst performer, though I have no idea why it's slower than just '-march=pentium-m'. To be honest I don't really trust GCC's SSE3 support in it's current state. I've looked hard and long for an official answer to this but no one seems to be able to give a concrete reason why one is better than the other, other than "it's based on the Pentium-M". It _is_, but it's still a very different animal. Until I got one I thought it'd be best to document both. --de.
Description: OpenPGP digital signature