On modern architectures this loop is inefficient due to a large number of conditional branches.
This is an instruction that combines the effect of a conditional branch and a move instruction.
It was programmable by punched tape, but lacked the conditional branch.
The following algorithm uses only one conditional branch per iteration.
There are two types of conditional branches: jumps to address and skips.
Except when we come to a conditional branch, or even a jump that's going to go somewhere, suddenly everything changes.
For example, a conditional branch may turn out to be always true or always false at this particular call site.
But the typical one, the instruction is subtract and conditional branch.
They may then be tested via conditional branch or jump instructions.
At each conditional branch, both targets are added to the working set.