My code currently has an optimization level of 8. But i'm out of code space and want to change it to level 9. Is there any side effect if we use optimization level 9??
That conclusion (especially the "in general" part) may or may not have been valid (haven't checked), but it is certainly true that the amount of "gain" from the higher optimisations does depend upon the nature of the application, and some may actually grow.
I've tested this on a few projects and found it to be the case in all those I tried, I'm pretty sure one or two others found similar results. I agree it is hardly a statistically conclusive test though.
Again, there is no substitute for writing the application "optimally" in the first place...
I agree that if code size or speed are important it is worth making the effort from the beginning where it is obvious that a benefit can be achieved, but if not the focus should be on clarity and maintainability. Unfortunately knowing whether micro optimisations are likely to be of benefit or even necessary is something that only comes with experience of the specific platform and toolchain. General rules such as 'you shouldn't use floating point in an embedded application' are daft - if there is no negative impact on the project then it makes sense to use it if it simplifies coding or reduces development time. There is the additional proviso with that particular example that you need to understand the sources of potential error, of course.