← Back to context

Comment by theteapot

4 hours ago

Is that true? The loop is a branch.

Who actually considers a loop a branch? A loop is a chunk of code that will be run N times depending on some evaluation that’s run before or after an iteration. A branch is a single decision which of several pieces of code to run, once.

The "go around" branch is obviously not completely avoidable (though unrolling helps). Branches inside the loop body sometimes are.