July 23rd, 2013, 07:44 AM
Re: A question regarding float and double
In a release build...
Originally Posted by 2kaud
The one example optimizes differently than the other.
In the first example it's possible to keep the intermediate result in the FPU (as a 10byte floating point)
In the 2Nd example this can't be done and the intermediate is stored in memory (as a double (8 byte))
So even though "it can't have an effect on calculations". Such assumptions can't be made about floating point intermediates.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.