For Next loop faster with counter after Next?

D

David Cox

I think perhaps you are all testing with nicely structured code. If you
sprinkled a few ifs and gotos around, wandering all over the place, like us
old fashioned real programmers used to do, the the compiler may not be able
to link a particular NEXT with its matching FOR without the variable
specified, and have to generate more complex code.

just a theory
 
T

Tom Ogilvy

If it can't, then it won't be able to run the code.

If's and goto's still have rules that the compiler has to interpret.

Just another thought.
 
R

RB Smissaert

I had thought about that, but I have tested with a very complex For Next
loop and I still couldn't see the difference.
As Tom says it would be bad news if the compiler would be thrown by that.
Clever bits of software these compilers, especially at the speed they do it.

RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top