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

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

Topic archived. No new replies allowed.