Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Question on performance



Lee Winter wrote:

Also users have to understand that aggressive optimization may replace
the expression (x!=x) with (false) because the optimization process
uses a more primitive FP algebra than '754 requires.  Such optimizers
also tend to ignore the sign of an underflow because they treat all
underflows as zeros and the sign of zero is not useful in the
primitive FP algebra they use.

So an optimizing compiler may also change ~(x<y) into x>=y, thereby altering without notice the result when x or y is NaN?

This would make it dangerous to rely on properties of the IEEE standard
regarding NaN.

Can one enforce different levels of optimization on different parts of code, and hence force a compile to respect these issues?