News Focus
News Focus
icon url

Haddock

05/01/03 9:14 AM

#3605 RE: jhalada #3584

I am assuming (my assembly skills are somewhere from rusty to non-existent) that any floating point instruction can be dispatched to processor through SSE-2 mechanism rather than FP, which is more efficient.

This is true, the only reason to use x87 fp in an x86-64 program is if you for some reason need 80 bit precision. But most fp code doesn't use that for portability reasons.

In gcc:
float is 32 bits
double is 64 bits and
long double is 80 bit taking up 128 bits in memory.

Most code uses floats or doubles.

You can use x87 for transcendentals (sin, cos etc.) but the concensus seems to be that you get better performance with software implementations, and in any case these functions are rarely used compared with the rest.