Talk:Optimizing C++/Code optimization/Pipeline


 * "comparisons are slower than differences, because they imply a branch"

This is bunk. The " " operator is a branching construct, because of its short-circuiting, not the comparison itself. In a tight loop, it can pay to use  instead; the code stay readable that way. Qwertyus (discuss • contribs) 14:12, 3 June 2014 (UTC)

Jumps are expensive on pipelined processors, and this is very important in microprocessors without branch prediction.

will typically generate (given min_i and max_i constants)

But the alternative

—Preceding unsigned comment added by 186.182.199.172 (discuss) 17 February 2015‎

(I hope you don't mind me fixing a few typos in the above text that distracted me from your good points, Qwertyus and '172. --DavidCary (discuss • contribs) 02:26, 3 April 2015 (UTC))