This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26788] New: optimization of expression templates not as performant as g++ 4.0.2
- From: "roebel at ircam dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2006 21:06:37 -0000
- Subject: [Bug c++/26788] New: optimization of expression templates not as performant as g++ 4.0.2
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
I just installed gcc 4.1.0 to compile my template expression
matrix arithmetric library (a la Blitz).
I recently did benchmarks with g++ 3.4.4
and 4.0.2 an I was pretty much impressed that g++ 4.0.2 managed to
optimize the expressions such that I obtained performance nearly
twice as fast as with g++ 3.4.4, and even better
the performance was the same as my hand coded pointer only implementation.
I was rather happy with this result. It seems that the handling of
pointer arrays that are stored in a struct that represents the expression
has been significantly improved.
Now, the downside. I tried 4.1.0 and I noticed that the performance dropped
down too a level even worse than gcc 3.4.4. I wondered about the reason and
scanned the optimization parameters. I found salias-max-implicit-fields
with a default value of 5. I guessed that might be the reason
and increased the value to 50. With this value I've got back the impressive
performance of g++ 4.0.2.
I wonder why the default value has been set so low that apparently it
cripples the optimizer to a level of optimization consierably
below what has been achieved with g++ 4.0.2 (where this option does not exist).
Does this option negatively affects performance elsewhere? If not
it seems to me that a default value that resembles the
settings in gcc 4.0.2 would be more sensible.
Kind regards,
and thanks anyway for this great compiler suite.
Axel
--
Summary: optimization of expression templates not as performant
as g++ 4.0.2
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: roebel at ircam dot fr
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26788