My code is quite simple
void foo(int n, double* a, double* b, double *c, double*d, double* e, double* f, double* g) { for (int i = 0; i < n; ++i) { a[i] = b[i] * a[i] + c[i] * (d[i] + e[i] + f[i] + g[i]); } }
I want a very good performance. Please suggest me an intel CPU for best performance of my code. And any strategy to optimize its performance with intel c++ compiler? Each iteration has 6 floating point operations. Can you estimate the maximum FLOPS it can reach. Currently I can get only about 3G FLOPS in i7. Thank a lot for your suggestion!