quote: Original post by msn12b
Hello? Are you joking or are you actually this stupid? You''re doing a FP compare immediately following the fabs()... even if you''re doing a simple fabs on a float, it is still faster to load and save from the FPU; the CPU can pair integer instructions w/ the FP instructions.
MSN
I disagree.
// FPU abs:FLD [value] ; 1 cycleFABS ST; 1 cycleFSTP [value] ; 2 cycles// Gives a total of 4 cycles.// Int abs on a float:MOV EAX, [value] ; 1/2 cycle; paired with other instructionAND EAX, 0x7FFFFFFF ; 1/2 cycle; paired with other instructionMOV [value], EAX ; 1/2 cycle; paired with other instruction// Gives a total of 1.5 cycles
if (4 > 1.5)
{ msn = wrong;
}
You can only pair a few integer instructions, never FPU!
What you mean is called interleaving I think, and it''s of no use in this situation!
Or am I as stupid as Poltras now? Come on msn12b - Poltras is oke!