This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Results for g++ 3.1 application testing on i686-pc-linux-gnu




ncm-nospam@cantrip.org said:
> stepanov_v1p2.C:
> -O
> Abstraction Penalty: 1.13
> -O2
> Abstraction Penalty: 1.32
> This is very odd, and suggests an optimization bug. Also, it would be
> interesting to see what happens with -O0. 

I first had the same reaction the first time Peter posted these 
results. Then I remembered that the abstraction penalty is the ratio 
of time between a C and a C++ version probably compiled with the same 
options. Thus it does not mean that the code compiled with -O2 is 
slower, it means that -O2 optimization is more effective with C than it 
is with C++ which is a pity but not a bug.

One thing that comes to mind is the problem of strict aliasing not 
done on classes that is currently partially re-enabled with 3.2 (or 
will be soon), or temporary objects that are not completely elided 
(and kept in registers).

Now, I may be wrong... There are certainly voices on the gcc lists that 
can speak with better knowledge of the problems at hand.

	Theo.


--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]