We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi
I would like to ask you what level of optimization to choose in final project.?
Is it good practice to leave the optimization level at 0 ?
There is also a check box "Optimize for time".
I have a simple, home projects (because of limitation in keil) but i want my code to be relible as during debug.
I have read a few descriptions about level, which do what and i am a little bit confused.
So i would like what is your opinion for that because i have no experience in programming as you :-)
Andy Neil said:Optimisation really doesn't affect the reliability of code
Not quiet true. I came across many situations where optimization affected the code. Up to the point to be completely useless.
Anyway: Testing should be done with the optimization which is to be used in the release version.
42Bastian Schick said:situations where optimization affected the code
In most cases, that indicates a flaw in the code; eg, failure to use 'volatile' where necessary; relying upon execution timing; etc ...
42Bastian Schick said:Testing should be done with the optimization which is to be used in the release version
Absolutely!
Andy Neil said:42Bastian Schick said:situations where optimization affected the code In most cases, that indicates a flaw in the code; eg, failure to use 'volatile' where necessary; relying upon execution timing; etc ...
Or: Compiler/Optimizer bugs ;-)
42Bastian Schick said:Compiler/Optimizer bugs
Of course, that's always possible - but very rare.