Generally, the higher the optimization level, the more efficiently your program runs. However, if the program you are debugging is optimized, the value of displayed variables may not be current.
While debugging your code, set the optimization level to the minimum level. This allows you to accurately display and change variables. After you have completed your debugging session, set the optimization level to the maximum level. This provides the highest levels of performance for the procedures in the program. See your compiler documentation for details on specifying optimization levels.