P
Patrick
Hello,
I noticed that there is time difference for the following problem:
Example: Array with size 32*100000
Now I iterate through the array with two for-loops:
for(i=0; i<32;i++){
for(j=0; j<100000; j++){
//store a value in the array
}
}
is 3 times slower than:
for(i=0; i<100000;i++){
for(j=0; j<32; j++){
//store a value in the array
}
}
but why?
the command within the loops will be executed 32*100000 in both cases.
I'm working with JBuilder10
Greetings and TIA
I noticed that there is time difference for the following problem:
Example: Array with size 32*100000
Now I iterate through the array with two for-loops:
for(i=0; i<32;i++){
for(j=0; j<100000; j++){
//store a value in the array
}
}
is 3 times slower than:
for(i=0; i<100000;i++){
for(j=0; j<32; j++){
//store a value in the array
}
}
but why?
the command within the loops will be executed 32*100000 in both cases.
I'm working with JBuilder10
Greetings and TIA