This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should



------- 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


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