|
Personally, I do n’t need to use SSE because the SSE instruction set is used to process large amounts of data, such as 4 FLOATs at the same time.
If it ’s not processing massive amounts of data, it ’s very inefficient.
Floating-point instructions are used, without looking at the instruction cycle, I don't know if it is fast
float comp (float x, float y)
{asm
{
FLD x; load X into st (0)
// FCOM y; you can also use the comparison instruction to set the sign bit
FSUB y st (0) -y results in st (0)
FST x stores st (0) into X
}
return x;
} |
|