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: Gcc 3.1 performance regressions with respect to 2.95.3


Thanks a lot for solving this problem. Do you have an idea why the
performace of the stepanov test decreases when increasing the optimization
level when gcc 3.1 is used? My experience is that the result, that
higher optimization levels result in a pessimization, is not
restricted to the stepanov test.

On my system a Pentium II running at 350 MHz, using gcc 3.1 20020315
I get the results:

gcc 3.1
-O

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.45sec    111.11M         1.00
 4        0.45sec    111.11M         1.00
 5        0.45sec    111.11M         1.00
 6        0.46sec    108.70M         1.02
 7        0.45sec    111.11M         1.00
 8        0.48sec    104.17M         1.07
 9        0.59sec    84.75M         1.31
10        0.58sec    86.21M         1.29
11        0.58sec    86.21M         1.29
12        0.59sec    84.75M         1.31
mean:     0.50sec    99.14M         1.12

Total absolute time: 6.60 sec

Abstraction Penalty: 1.12

-O2

test      absolute   additions      ratio with
number    time       per second     test0

 0        0.44sec    113.64M         1.00
 1        0.53sec    94.34M         1.20
 2        0.54sec    92.59M         1.23
 3        0.62sec    80.65M         1.41
 4        0.61sec    81.97M         1.39
 5        0.56sec    89.29M         1.27
 6        0.57sec    87.72M         1.30
 7        0.56sec    89.29M         1.27
 8        0.57sec    87.72M         1.30
 9        0.62sec    80.65M         1.41
10        0.61sec    81.97M         1.39
11        0.62sec    80.65M         1.41
12        0.61sec    81.97M         1.39
mean:     0.57sec    87.49M         1.30

Total absolute time: 7.46 sec

Abstraction Penalty: 1.30

-O3

test      absolute   additions      ratio with
number    time       per second     test0

 0        0.44sec    113.64M         1.00
 1        0.53sec    94.34M         1.20
 2        0.52sec    96.15M         1.18
 3        0.61sec    81.97M         1.39
 4        0.60sec    83.33M         1.36
 5        0.56sec    89.29M         1.27
 6        0.55sec    90.91M         1.25
 7        0.57sec    87.72M         1.30
 8        0.55sec    90.91M         1.25
 9        0.60sec    83.33M         1.36
10        0.60sec    83.33M         1.36
11        0.62sec    80.65M         1.41
12        0.61sec    81.97M         1.39
mean:     0.56sec    88.66M         1.28

Total absolute time: 7.36 sec

Abstraction Penalty: 1.28

When gcc 2.95.3 is employed as the compiler, the results are:

-O

test      absolute   additions      ratio with
number    time       per second     test0

 0        0.44sec    113.64M         1.00
 1        0.47sec    106.38M         1.07
 2        0.47sec    106.38M         1.07
 3        0.56sec    89.29M         1.27
 4        0.57sec    87.72M         1.30
 5        0.56sec    89.29M         1.27
 6        0.57sec    87.72M         1.30
 7        0.56sec    89.29M         1.27
 8        0.57sec    87.72M         1.30
 9        0.56sec    89.29M         1.27
10        0.57sec    87.72M         1.30
11        0.57sec    87.72M         1.30
12        0.56sec    89.29M         1.27
mean:     0.54sec    92.81M         1.22

Total absolute time: 7.03 sec

Abstraction Penalty: 1.22

-O2

test      absolute   additions      ratio with
number    time       per second     test0

 0        0.45sec    111.11M         1.00
 1        0.47sec    106.38M         1.04
 2        0.48sec    104.17M         1.07
 3        0.46sec    108.70M         1.02
 4        0.59sec    84.75M         1.31
 5        0.46sec    108.70M         1.02
 6        0.46sec    108.70M         1.02
 7        0.46sec    108.70M         1.02
 8        0.47sec    106.38M         1.04
 9        0.46sec    108.70M         1.02
10        0.59sec    84.75M         1.31
11        0.46sec    108.70M         1.02
12        0.47sec    106.38M         1.04
mean:     0.48sec    103.93M         1.07

Total absolute time: 6.28 sec

Abstraction Penalty: 1.07

-O3

test      absolute   additions      ratio with
number    time       per second     test0

 0        0.44sec    113.64M         1.00
 1        0.46sec    108.70M         1.05
 2        0.45sec    111.11M         1.02
 3        0.46sec    108.70M         1.05
 4        0.45sec    111.11M         1.02
 5        0.45sec    111.11M         1.02
 6        0.46sec    108.70M         1.05
 7        0.46sec    108.70M         1.05
 8        0.45sec    111.11M         1.02
 9        0.45sec    111.11M         1.02
10        0.45sec    111.11M         1.02
11        0.46sec    108.70M         1.05
12        0.45sec    111.11M         1.02
mean:     0.45sec    110.37M         1.03

Total absolute time: 5.89 sec

Abstraction Penalty: 1.03

Thank you.

Peter Schmid



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