On Mar 7, 12:17 pm, Juan Castillo <[EMAIL PROTECTED]> wrote: > Hello everyone. This is the first time I write something in a forum. I > apologize if I make something wrong. > > I am trying to evaluate the impact of compiler optimizations in the machine > code obtained (more specific, in the number of instructions necessary to > execute a program). I am very new about compiler theory, so analyzing gcc > source code is very far of my understanding (but really far...) :-) > > I would like to know if there is a set of benchmarks that I could run and > get a gain percentage between compile without optimizations and compile with > them. It has not to be an exact value, but an estimation (for example, > 40-50%). Any other solution or suggest to my problem will be welcome. > > Thank you very much. > -- > View this message in > context:http://www.nabble.com/Any-benchmark-to-evaluate-GCC-optimizations-per... > Sent from the gcc - Gnu Help List mailing list archive at Nabble.com.
You will have to experiment a bit as much depends on the particular architecture and on the program. For instance, expect a program with lots of gotos to be slower as gotos tend to make analysis harder (they can't generate acyclic flow graphs). Also expect anything using RTTI (Run-time Type Identification) and Exceptions to be slower as these tend to require more scaffolding. BTW: Using anything more aggressive than -O2 -fomit-frame-pointer is not really recommended as more aggressive optimisations tend to be counter-productive. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus