10.2.7 Unswitching

Here, the test is performed each time through the loop. The following performs the test once:

The second version here reduces the number of instructions executed, but the code takes more space.

Send questions and comments to: Karen Lemone