Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • "Branches with positive branch offsets (downwards) are considered to be likely not taken, that is the fall-through case is the default one."

    Yup, this comes down to branch prediction in the CPU which is one of many performance tricks they do. You've probably guessed this, but they also expect that branches with negative branch offsets are likely to be taken, since they are probably loops. That means you're better off putting your termination test at the end of the loop, and to account for loops where you test the condition first branch to the test. And as that's an unconditional branch, there's no chance of predicting it wrong. :-)