I am using the NuMega/Compuware Truetime tool to measure performance in a
simple console application. I have tested the following code several times
with consistent results
// The following code is faster
for(int i = 0; i < 10000; ++i)
{
// do anything here ... Console.WriteLine, assign i to another variable,
it doesn't matter....
}
// than this code
for (int = i; i < 10000; ++i)
// do anything here ... Console.WriteLine, assign i to another variable,
it doesn't matter....
Do the braces speed up code execution? Why/how?
You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.