NEON has same performance as C on IMX7

91 views Asked by At

Hi I'm developing and image processing application on the Nxp imx7 and I want to compare performance of NEON instrutions vs pure C.

c: a,b,c are float32. Take 11ms to run

for(int pixIndex = 0; pixIndex<(640*480); pixIndex++)
{
    a[pixIndex] = (a[pixIndex] * b[pixIndex]) + c[pixIndex];
}

NEON: Take 10ms to run

for(int pixIndex = 0; pixIndex < (640*480)/2; pixIndex++)
{
    float32x2_t dVect1, dVect2,dVect3;

    dVect1 = vld1_f32(a);
    dVect2 = vld1_f32(b);
    dVect3 = vld1_f32(c);
    dVect1 = vmla_f32(dVect3, dVect1, dVect2);
    vst1_f32(a, dVect1);
    a += 2;
    b += 2;
    c += 2;
}

Why NEON is only 1ms faster than c ? Do I miss something here ?

0

There are 0 answers