Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Which loop is faster?

Name: Anonymous 2012-01-16 8:59


for (I = 0; I < N; I++)
  for (J = 0; J < M; J++)
    update(Xs[I][J]);

or

for (I = 0; I < N; I++)
  for (J = 0; J < M; J++)
    update(Xs[J][I]);

???

Name: Anonymous 2012-01-16 10:44

>>17
Naw, I just google/wiki random stuff when not playing Touhou.
I also think that this question cannot be answered untill a complete definition of Xs[I][J] is posted.

For example in our beloved sepples you could probably make overload indexing operators and this would return a constant.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List