I'm using VC++.NET 2003 version, I have a rather complex program that, in some point, uses 2 nested for loops like this:
Code:
for (int i = 0; i < 2000; i++) {
if ( /* some condition */ ) { continue; }
for (int j = 0; j < 2000; j++) {
if ( /* some condition */ ) { continue; }
if ( /* some condition */ ) {
// do something
}
}
}
I can't optimize it any further.
The problem is that this loop takes around 2 minutes to finish on my 2.4 GHz P4!
I used the debugger and made the sure that this loop is delaying the whole program, nothing else.
I tried to find something wrong in the conditions or the processing but everything was OK, finally I decided to switch to release mode and voila, it take only 3 seconds!
I'm using release mode right now, it work fine, however, I can't use the debugger any more
Any ideas how to speed things up in debug mode? cuz I really need the debugger.
thx