From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4922 invoked by alias); 28 Oct 2004 10:31:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4901 invoked by uid 48); 28 Oct 2004 10:31:49 -0000 Date: Thu, 28 Oct 2004 10:31:00 -0000 From: "dkouroun at mailbox dot gr" To: gcc-bugs@gcc.gnu.org Message-ID: <20041028103142.18192.dkouroun@mailbox.gr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/18192] New: Serious Performance Bug depending on a donothing destructor declaration X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg03453.txt.bz2 List-Id: 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