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 :-)
Which compiler are you using?
slawek krzysiek said: i want my code to be relible as during debug.
Optimisation really doesn't affect the reliability of code
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.
Andy Neil said:Which compiler are you using?
Keil MDK ARM
You are right but it did not help me. I will ask in a different way, Which level you are using for ARM Cortex M