What is the Performance Cost of Ternary Operator
<p>I've heard compilers are very smart and know how to optimize if / else statements.</p>

<p>I've also heard ternaries are high performance because they go through the CPU's instruction pipeline less.</p>

<p>Let me clarify, based on what I've heard:</p>

<p>An if / else must pass its condition through the pipeline  and wait for the result before it can perform the calculations for the outcome.</p>

<p>However a ternary can pass both the outcomes' calculations to the cpu without having to wait for the boolean expression to pass through the pipeline.</p>

<p>So, which is faster, ternaries or if / else ?</p>