https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113365

--- Comment #4 from newbie-02 <newbie-02 at gmx dot de> ---
hello @Andrew Pinski,   

just if I'm allowed to add one more point / question:  

using the testing program, playing with optimization, I get  
the following results for binary64s ( doubles ):  

unoptimized:  
time:     result:                    calculation:  
0.005571; 4.940656458412465442E-324; x2d = nextafter( 1E-323, 0.0 ) 
0.002029; 4.940656458412465442E-324; x2d = ( ( 1E-323 ) - 5E-324 ) 
0.005395; 1.482196937523739633E-323; x2d = nextafter( 1E-323, 1.0 ) 
0.002023; 1.482196937523739633E-323; x2d = ( ( 1E-323 ) + 5E-324 ) 
which points out that addition / subtraction are faster in denormals,  
or assignd at compile time despite x2d is defined volatile.  

optimized ( compiled with -O2 ): I mostly! get understandable results,  
( nextafter similar and ADD / SUB faster reg, compiler cheating?,  
but on some occasions ( ~10% of compile attempts ):  
time:     result:                    calculation:  
0.009311; 4.940656458412465442E-324; x2d = nextafter( 1E-323, 0.0 ) 
0.000420; 4.940656458412465442E-324; x2d = ( ( 1E-323 ) - 5E-324 ) 
0.009668; 1.482196937523739633E-323; x2d = nextafter( 1E-323, 1.0 ) 
0.000423; 1.482196937523739633E-323; x2d = ( ( 1E-323 ) + 5E-324 ) 
which has ** ~doubled execution time for nextafters **.  

Is that something I should worry about? Somthing which could be improved?  
Either here by options or in gcc?

Reply via email to