But, an optimizing compiler (such as used by C++ and VB) could rewrite the code before compilation to put the IF before two FOR's making it faster yet.