As already mentioned, you really need to measure optimization in the context of typical use cases for your own applications in typical target environments. For this reason, I include timers in my own set for automatic regression and found some unusual results described in the previous question . FWIW, I find VS2010 SP1, creating about 8% faster than VS2008 on my own application, about 13% when optimizing the entire program. It does not spread evenly in different cases. I also tend to see significant differences between lengthy test runs that are not visible, profiling much smaller test cases. I haven't done platform comparisons yet, for example. have many advantages for a platform or equipment.
I would suggest that many optimizers will be well tuned to give better results with respect to well-known reference sets, which in turn may mean that these are not the best code fragments that can be used to test the benefits of optimization. (Speculation, of course)
source share