If we had two arrays,
bool trueFalse[10][10];
bool falseTrue[100];
and we looped through them like this:
for(int i = 0; i < 10; i++)
{
for(int k = 0; k < 10; k++)
{
trueFalse[i][k] = !trueFalse[i][k];
}
}
for(int i = 0; i < 100; i++)
{
falseTrue[i] = !falseTrue[i];
}
Which would be faster? Or would it be the same?
Update:
This is specifically for non-dynamic data. The sizes of the arrays will be set once, but after that they wont be changed again.