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
- From: Peter Schmid <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: Jason Merrill <jason at redhat dot com>, <gcc at gcc dot gnu dot org>, <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 18 Mar 2002 01:38:14 +0100 (CET)
- Subject: Re: Gcc 3.1 performance regressions with respect to 2.95.3
> It is more or less special case. Overall 3.1 groks better the code
> with lots of abstraction, but in this case 2.95 got particulary lucky.
> It runs into similar slowdown only on slightly modified Stephanov as
> long as I can remember.
>
That is only partly true. When I benchmark gcc 3.1 at the -O versus
-O2 optimization level with the help of the bench++ test suite, the
performance is better in 45 cases at -O. Interestingly, the checks
measuring loop overhead (L*) run all faster at the -O level. L00004 runs
two times faster. And even more interesting is that o000007[a,b].cpp which
checks the strength reduction capabilities of the compiler, o000007a.cpp
which checks dead code elimination, o000010b.cpp which checks redundant
code and o000011a.cpp checking the unreachable code optimizating facility
run slower at the -O2 optimization level although this level provides
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
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?
Hope this helps,
Peter Schmid
RELATIVE TIMES ..........
TEST NAME Pentium II, 350 MHz Pentium II, 350 MHz
gcc 3.1 gcc 3.1
-O -O2
--------- ------------------- -------------------
A000091 1.00 1.00
A000092 1.00 0.99
A000094a 1.00 1.08
A000094b 1.00 0.87
A000094c 1.00 1.00
A000094d 1.00 0.67
A000094e 1.00 0.67
A000094f 1.00 0.95
A000094g 1.00 0.98
A000094h 1.00 0.83
A000094i 1.00 0.68
A000094j 1.00 0.96
A000094k 1.00 0.44
B000002b 1.00 1.02 *
B000003b 1.00 1.02 *
B000004b 1.00 1.01 *
B000010 1.00 0.98
B000011 1.00 0.99
B000013 1.00 0.81
D000001 1.00 0.99
D000002 1.00 1.01 *
D000003 1.00 0.99
D000004 1.00 1.01 *
D000005 1.00 1.16 *
D000006 1.00 1.00
E000001 1.00 0.98
E000002 1.00 0.98
E000003 1.00 0.68
E000004 1.00 0.59
E000007 1.00 1.00
E000008 1.00 1.07
F000001 1.00 1.44 *
F000002 1.00 1.44 *
F000003 1.00 0.37
F000004 1.00 0.55
F000005 1.00 0.59
F000006 1.00 0.70
F000007 1.00 0.88
F000008 1.00 1.14 *
G000001 1.00 0.95
G000002 1.00 0.99
G000003 1.00 1.05 *
G000004 1.00 1.01 *
G000005 1.00 0.92
G000006 1.00 1.05 *
G000007 1.00 1.03 *
H000001 1.00 1.01 *
H000002 1.00 1.00
H000003 1.00 0.90
H000004 1.00 0.88
H000005 1.00 0.00
H000006 1.00 0.88
H000007 1.00 0.99
H000008 1.00 0.76
H000009 1.00 0.99
L000001 1.00 1.21 *
L000002 1.00 1.16 *
L000003 1.00 1.38 *
L000004 1.00 2.00 *
O000001a 1.00 0.82
O000001b 1.00 0.83
O000002a 1.00 0.94
O000002b 1.00 1.00
O000003a 1.00 1.09 *
O000003b 1.00 0.96
O000004a 1.00 1.05 *
O000004b 1.00 1.05 *
O000005a 1.00 1.01 *
O000005b 1.00 0.85
O000006a 1.00 0.94
O000006b 1.00 0.86
O000007a 1.00 1.15 *
O000007b 1.00 1.26 *
O000008a 1.00 1.08 *
O000008b 1.00 0.95
O000009a 1.00 0.84
O000009b 1.00 0.85
O000010a 1.00 0.99
O000010b 1.00 1.07 *
O000011a 1.00 0.93
O000011b 1.00 1.05 *
O000012a 1.00 1.00
O000012b 1.00 0.99
P000001 1.00 0.61
P000002 1.00 0.72
P000003 1.00 0.65
P000004 1.00 0.00
P000005 1.00 1.43 *
P000006 1.00 1.14 *
P000007 1.00 1.10
P000008 1.00 1.21 *
P000010 1.00 0.76
P000011 1.00 0.98
P000012 1.00 1.11 *
P000013 1.00 1.00
P000020 1.00 0.93
P000021 1.00 0.59
P000022 1.00 0.59
P000023 1.00 1.12 *
S000001a 1.00 0.93
S000001b 1.00 1.17 *
S000002a 1.00 0.53
S000002b 1.00 0.59
S000003a 1.00 0.63
S000003b 1.00 1.02 *
S000004a 1.00 1.47 *
S000004b 1.00 0.99
S000005a 1.00 1.03 *
S000005b 1.00 0.97
S000005c 1.00 1.03 *
S000005d 1.00 0.97
S000005e 1.00 1.18 *
S000005f 1.00 0.98
S000005g 1.00 1.12 *
S000005h 1.00 0.98
S000005i 1.00 1.03 *
S000005j 1.00 0.97
S000005k 1.00 1.01 *
S000005l 1.00 0.98
S000005m 1.00 1.00