This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc 3.1 performance regressions with respect to 2.95.3
> > specific optimizations for these problems. Furthermore, function calls are
> > slower at the -O2 level:
> > p000005.cpp Static Class Method Call: 1-int Arg: Catches Exceptions
> > p000006.cpp Static Class Method Call: 1-int *Arg: Catches Exceptions
> > p000008.cpp Procedure Call: No Parameters: Called thru pointer, Catches Exceptions
> > p000012.cpp Procedure Call: 10-(3-int) Args: Catches Exceptions
> > p000023.cpp Same as p000022: called in loop to see if lookup is optimized
This is not the function call overhead, it is exception handling slowdown.
Gcc 3.1 exception handling is designed to have low overhead in code size,
startup time and execution time as long as no exceptions are thrown.
When exception is thrown, more job needs to be done. I think this is good
given the nature of exceptions. Using exceptions in internal loops is bad
style and should be penalized.
Gcc 2.95 eh mechanizm has been almost unusuable for projects like KDE as the
dynamic linking time of application grown unacceptably as did the resulting
executable file size.
Honza
> >
> > And in addition to the decrease in the performance of the stepanov tests
> > there is a substantial decrease in the performance for processing
> > complex numbers (S000004a).
> >
> > It looks that there are some flaws in the -O2 optimizer passes. Is
> > there a chance that this is fixed for the upcoming gcc 3.1 release?
>
> There are so many possible reasons for these problems it's not
> funny.
> Especially on x86, where register pressure matters a lot.
> If you had smaller test cases, it would be helpful.
> In the meanwhile, i'm going to run these on powerpc and see if i come up
> with the same relative times.