G++ could optimize ASM code more

Marc Glisse marc.glisse@inria.fr
Wed May 9 19:48:00 GMT 2012


On Wed, 9 May 2012, Daniel Marschall wrote:

> 1. I do not know my DisplayName/DisplayFamily (0f_2h or 0f_3h?).

Ask your processor (cpuid). Or your kernel (/proc/cpuinfo on linux).

> 3. Should I compare Latency or Throughput if I want to produce fast code? Or 
> doesn't it matter which value I compare?

Both. And you also need to look at the code that is nearby, not just this 
one instruction. In short, don't bother. If you really want to know, 
benchmark both versions.

-- 
Marc Glisse



More information about the Gcc mailing list