[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any benchmark to evaluate GCC optimizations performance??

From: jbannon
Subject: Re: Any benchmark to evaluate GCC optimizations performance??
Date: 7 Mar 2007 14:26:47 -0800
User-agent: G2/1.0

On Mar 7, 12:17 pm, Juan Castillo <> 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:
> Sent from the gcc - Gnu Help List mailing list archive at

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]