[Bug c++/18192] New: Serious Performance Bug depending on a donothing destructor declaration
dkouroun at mailbox dot gr
gcc-bugzilla@gcc.gnu.org
Thu Oct 28 10:31:00 GMT 2004
Dear GCC Team,
I have experienced a serious performance bug
with g++-3.4.2. In the attached code you can
see the source code which is quite simple. In
the file TypeDefinitions.h I use some typedef
statements to be able play with different types.
The problem is in file FiniteElementTypes.h!!!
The one and only class in that file has a
destructor declaration :
public:
~FiniteElement() {}
When that destructor is commented out the program
in my Sony-VAIO pentium4 2.66GHz needs almost
4.450 seconds to run. When this destructor is not
commented out the program needs 7.350 seconds to run.
Even worse, when the destructor is not commented out
and I change in TypeDefinitions.h the type Real from
cRref to:
typedef cR Real;
the program needs 10.540 seconds to run. If I go to
the file AsmExprOperators.h and having
typedef cR Real;
in Typedefinitions, I change all operators() from
==>inline R operator()(indexType i, Real x, Real y, Real z) const
to
==>inline R operator()(indexType i, Real& x, Real& y, Real& z) const
then the program again needs 7.300 seconds to run.
Of course if I comment out the destructor declaration from the
class FiniteElement then the program needs only 4.430 seconds to run.
SuSE Linux 9.0 gcc-3.3.1 is insensitive to the destructor declaration
but it needs almost 29.800 seconds!
Intel ICC compiler though version 8.1.022 is also insensitive
to the destructor declaration and it needs only 4.300 seconds!
--
Summary: Serious Performance Bug depending on a donothing
destructor declaration
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dkouroun at mailbox dot gr
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: SuSE 9.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18192
More information about the Gcc-bugs
mailing list