This article by the Visual C++ team on optimizing native applications is interesting. It's about a new way of optimizing C++ code at run-time.
Traditional compiler options are done at compile time on the source files. PGO (Profile Guided Optimizations) work by compiling with a special source flag (and VC 2012) and a link flag. When the application is run, it gathers performance information.
So if it's spending say 90% of its time through a particular path then this will be noted, along with nine other possible types of optimizations. Then you rebuild (Link with a special Optimize flag) and that build then incorporates optimizations based on that performance data.
- Link to C programming tutorials