Enabling and disabling optimizations for the complete project or one of its modules can have a significant impact on the entire project.
With the #pragma optimize instructions you can selectively enable or disable specific optimizations at the source level, and obtain more fine-tuned results.
#pragma optimize Y
[code]
#pragma optimize restore
In the above example, the peephole optimization is turned off for the code between the #pragma optimize instructions.
#pragma optimize/optimize restore pairs can be nested.