Code runs faster using placement new
===

I got this class,

Approach 1:

    typedef float v4sf __attribute__ (vector_size(16))
    
    class Unit
    {
      public:
       Unit(int num)
       {
         u = new float[num];
         v = new float[num];
       }
       void update()
       {
         for(int i =0 ; i < num; i+=4)
         {
           *(v4sf*)&u[i]=*(v4sf*)&v[i]+*(v4sf*)&t[i];
           //many other equations
         }
       }
       float*u,*v,*t; //and many other variables
    }

Approach 2) is same as approach 1) except that in 2) v,u and all other variables is allocated on a big chunk pre-allocated on heap, using placement new. However approach 2) is 2x faster. Why is that?

There are around 12 float variables and i create 500K of each. update() is called 1K times.
Compiler options: gcc -msse4 -o3 -ftree-vectorize.

L1 cache is 256K, Ram is 8GB, pagesize is 4K.  

