Loading
Code that runs only when something is true.
A control structure that chooses between code paths based on a boolean expression. `if/else` and `switch` are the common forms. Most languages also offer a ternary expression (`cond ? a : b`) for inline use.
A forward branch in the control-flow graph. Branch prediction in modern CPUs makes correctly-predicted branches nearly free, while mispredicts can cost 10-20 cycles. Branchless code (using arithmetic or conditional moves) can be faster on critical loops.