I've heard compilers are very smart and know how to optimize if / else statements.
I've also heard ternaries are high performance because they go through the CPU's instruction pipeline less.
Let me clarify, based on what I've heard:
An if / else must pass its condition through the pipeline and wait for the result before it can perform the calculations for the outcome.
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.
So, which is faster, ternaries or if / else ?