I encountered a very hard problem in my thesis. The same function, one with no statistics, and the other with some statistical statements, was found during performance comparison, the time for adding a statistic is usually shorter than the time for not adding it !! This is very unscientific .. In addition, the performance of the AC guy is also very strange, it is better than ACBM, It is not scientific. In the sameCodeIt is completely normal to compile and run on the brother's machine!
After being depressed for a long time, I finally found the reason for my happiness !!!
The post to solve the problem is about codeblocks's automatic append compilation options.
It turns out that the project automatically adds the-O2 and-s optimization options, but this option is not set in settings-> compiler, so it has not been found before.
Right-click the project, build options-> compiler flags, and deselect the optimize XX option. deselect the strip all symbols from binary check box. Then, I am not very clear about how it affects me.ProgramRunning.