This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2007 16:20:27 -0000
- Subject: [Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- References: <bug-29286-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #166 from rguenth at gcc dot gnu dot org 2007-06-05 16:20 -------
It causes a 10% performance regression for tramp3d. There appear to be no
significant changes in libstdc++ performance testing. "Fixing" tramp3d-v4
with the below patch cures the performance regression.
--- tramp3d-v4.cpp 2007-05-16 15:02:47.000000000 +0200
+++ tramp3d-v4x.cpp 2007-06-05 18:11:40.000000000 +0200
@@ -29583,10 +29583,6 @@
VectorEngine()
{
PoomaCTAssert<(ElementProperties<T>::hasTrivialDefaultConstructor &&
ElementProperties<T>::hasTrivialDestructor &&
ElementProperties<T>::concrete)>::test();
- for (int i = 0; i < D; ++i)
- {
- ElementProperties<T>::construct(&x_m[i]);
- }
}
inline VectorEngine(const VectorEngine<D,T,Full>&);
template<class X>
(ElementProperties<T>::construct calls placement new)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286