Different results when using different optimization options 
Author Message
 Different results when using different optimization options

We have a component with mathematic calculations that produces different
results in the following configurations:
Release: Maximize speed
Release: MinSize
Release: Disable optimizations

Could it be a problem in our source in stead of a bug of the compiler?
Should we always disable optimizations in mathematic components?

Thanks in advance,
Kurzweil



Tue, 08 Nov 2005 20:17:31 GMT  
 Different results when using different optimization options

Quote:

> We have a component with mathematic calculations that produces different
> results in the following configurations:
> Release: Maximize speed
> Release: MinSize
> Release: Disable optimizations

> Could it be a problem in our source in stead of a bug of the compiler?

  It could be both.
  Unfortunately, the only way to find this out
  is to find a small repro case. Fortunately,
  this is also the first step to solve the
  problem, no matter whether it is a compiler
  problem or your own.

Quote:
> Should we always disable optimizations in mathematic components?

  Then what would be the point of the compiler
  beeing able to optimize?

Quote:
> Thanks in advance,
> Kurzweil

  Schobi

--

I'm Schobi at suespammers org



Tue, 08 Nov 2005 23:40:38 GMT  
 Different results when using different optimization options

--------------------

Quote:

>Subject: Re: Different results when using different optimization options
>Date: Fri, 23 May 2003 17:40:38 +0200


>> We have a component with mathematic calculations that produces different
>> results in the following configurations:
>> Release: Maximize speed
>> Release: MinSize
>> Release: Disable optimizations

>> Could it be a problem in our source in stead of a bug of the compiler?

>  It could be both.
>  Unfortunately, the only way to find this out
>  is to find a small repro case. Fortunately,
>  this is also the first step to solve the
>  problem, no matter whether it is a compiler
>  problem or your own.

>> Should we always disable optimizations in mathematic components?

>  Then what would be the point of the compiler
>  beeing able to optimize?

>> Thanks in advance,
>> Kurzweil

>  Schobi

>--

>I'm Schobi at suespammers org

Assuming that you are doing floating point calculations, try compiling /Op.
This switch tells the optimizer to maintain floating point precision and
can greatly stabilize results.

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.



Mon, 14 Nov 2005 02:37:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ATL7 / different OSs == different results

2. Different results of OpenSchema() with different drivers?

3. For help: under different OS has different compile result

4. different machines different results

5. For help: different OS has different compile result

6. Using types in a different assembly given that the type may be used or not used

7. Same program, same data, different result.

8. Why different result?

9. Why different results?

10. Same program, same data, different result.

11. program produces different results

12. Different results - is the book example wrong?

 

 
Powered by phpBB® Forum Software