This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ 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: Sun, 17 Mar 2002 19:12:44 +0100 (CET)
- Subject: Re: Gcc 3.1 performance regressions with respect to 2.95.3
It seems that the option -frerun-cse-after-loop causes a 10 percent
slowdown. But I am not sure if that was the option you asked me to
turn off. On the other hand even when -fno-rerun-cse-after-loop is
added to the -O2 optimization level the performance is still slower
that at the -O level. If I remember correctly gcc 3.0 has about the
same performance as gcc 3.1. Therefore, could you please make your
patch versus 3.1 available to me. Since the performace of the stepanov
test is one of gcc 3.1 release criteria and there is a more than 15
percent slowdown with respect to gcc 2.95.3, I consider the current
result as a major flaw of gcc 3.1, since the abstraction penalty
should be close to one for a decent compiler, at least when
optimization is turned on.
Hope this helps,
Peter Schmid
g++ -O2 -fno-rerun-cse-after-loop -fno-rerun-loop-opt
time ./a.out
test absolute additions ratio with
number time per second test0
0 0.44sec 113.64M 1.00
1 0.54sec 92.59M 1.23
2 0.55sec 90.91M 1.25
3 0.47sec 106.38M 1.07
4 0.48sec 104.17M 1.09
5 0.56sec 89.29M 1.27
6 0.57sec 87.72M 1.30
7 0.57sec 87.72M 1.30
8 0.56sec 89.29M 1.27
9 0.48sec 104.17M 1.09
10 0.48sec 104.17M 1.09
11 0.47sec 106.38M 1.07
12 0.48sec 104.17M 1.09
mean: 0.51sec 98.12M 1.16
Total absolute time: 6.65 sec
Abstraction Penalty: 1.16
real 0m6.839s
user 0m6.660s
sys 0m0.000s
g++ -O2 stepanov_v1p2.C -fno-rerun-loop-opt
time ./a.out
test absolute additions ratio with
number time per second test0
0 0.45sec 111.11M 1.00
1 0.54sec 92.59M 1.20
2 0.54sec 92.59M 1.20
3 0.62sec 80.65M 1.38
4 0.61sec 81.97M 1.36
5 0.57sec 87.72M 1.27
6 0.56sec 89.29M 1.24
7 0.57sec 87.72M 1.27
8 0.57sec 87.72M 1.27
9 0.62sec 80.65M 1.38
10 0.60sec 83.33M 1.33
11 0.62sec 80.65M 1.38
12 0.61sec 81.97M 1.36
mean: 0.57sec 87.20M 1.27
Total absolute time: 7.48 sec
Abstraction Penalty: 1.27
real 0m7.560s
user 0m7.490s
sys 0m0.010s
peter@kiste:~/trans>
time ./a.out
g++ -O2 stepanov_v1p2.C -fno-rerun-cse-after-loop
test absolute additions ratio with
number time per second test0
0 0.44sec 113.64M 1.00
1 0.54sec 92.59M 1.23
2 0.54sec 92.59M 1.23
3 0.48sec 104.17M 1.09
4 0.48sec 104.17M 1.09
5 0.56sec 89.29M 1.27
6 0.57sec 87.72M 1.30
7 0.57sec 87.72M 1.30
8 0.57sec 87.72M 1.30
9 0.47sec 106.38M 1.07
10 0.48sec 104.17M 1.09
11 0.47sec 106.38M 1.07
12 0.48sec 104.17M 1.09
mean: 0.51sec 98.13M 1.16
Total absolute time: 6.65 sec
Abstraction Penalty: 1.16
real 0m6.747s
user 0m6.660s
sys 0m0.020s
g++ -O stepanov_v1p2.C
time ./a.out
test absolute additions ratio with
number time per second test0
0 0.45sec 111.11M 1.00
1 0.53sec 94.34M 1.18
2 0.54sec 92.59M 1.20
3 0.46sec 108.70M 1.02
4 0.46sec 108.70M 1.02
5 0.46sec 108.70M 1.02
6 0.46sec 108.70M 1.02
7 0.45sec 111.11M 1.00
8 0.49sec 102.04M 1.09
9 0.59sec 84.75M 1.31
10 0.60sec 83.33M 1.33
11 0.58sec 86.21M 1.29
12 0.60sec 83.33M 1.33
mean: 0.51sec 98.10M 1.13
Total absolute time: 6.67 sec
Abstraction Penalty: 1.13
real 0m6.759s
user 0m6.690s
sys 0m0.000s