In the Intel Archetecture Software Developer's Manual the description for PREFETCHn states that some processors may simply ignore this instruction (NOP it). The CPUID tables do not seem to return information as if the CPU supports PREFETCH or ignores PREFETCH. Is there a programical way of determining this (other than running a benchmark test at application initialization)?
The reason I ask is in a test program on Q6600 PREFETCHn (all variations of n) slow down the program whereas replacing the PREFETCHn FutureAddress with
trash = *FutureAddress; // copy aligned __int64
foo = expressionWithDoubleUsingCurrentAddress;
Gets marginal speedup
Note, the integer load will eventually stall for the read.Whereas PREFETCHn will (should) not introduce a stall waiting for memory.