Strided memory access

May 10, 2013 at 6:35pm
Hi...

why is it said that using a loop as one below is bad in terms of performance ?

for(i = 0; i < N; i+=M)
{
//some code
}

where M is any number > 1
But, I get higher performance for the same loop if I go to higher powers of 2..e.g. 16,32,64 etc...
May 10, 2013 at 7:17pm
I don't see why would it have bad performance.
Topic archived. No new replies allowed.