This section describes several programming guidelines that can help you improve the performance of floating-point applications:
- Avoid exceeding representable ranges during computation; handling these cases can have a performance impact.
- Use a single-precision type (for example,
float) unless the extra precision and/or range obtained through
double or
long double is required. Greater precision types increase memory size and bandwidth requirements. See
Using Efficient Data Types section.
- Reduce the impact of denormal exceptions for all supported architectures.
- Avoid mixed data type arithmetic expressions.