I am working on an application where execution speed is more important than accuracy. Number crunching involves floating point arithmetic, and I'm worried that doubleand / or are long doubleprocessed in software and not initially on the processor (is this always true for a 32-bit arc on the right?). I would like to conditionally compile with maximum precision with hardware support, but I did not find a quick and easy way to detect software emulation. I am using g ++ on GNU / Linux and I am not worried about portability. It works on x86-arch, so I assume that floatit is always native.
double
long double
float
The floating-point module (FPU) on modern x86 initially doubles (in fact, it is even larger than a double), not a float ("32" in 32-bit form describes the width of an integer register, not a floating-point width). However, this is not true if your code uses vectorized SSE instructions that perform either 4 single or 2 double operations in parallel.
If not, then your main speed associated with switching the application from floating to double will be in increased memory bandwidth.
(is this always true for a 32-bit arc?)
. double ( long double). , , , . , .
, "" double, - . Cell ( Playstation 3) double FPU, , float, . double. , float.
20- , ,
x86 float, double . 32- SSE2, .
x86 80 , .
, ( ) , ?