does c++ short circuit evaluation cause jumps and CPU-pipeline-flushes?
AFAIK c++ guarantees that in a expression a-expr && b-expr
b-expr
is not evaluated if a-expr
is false
. (Similar is true for or-expressions)
does c++ short circuit evaluation cause jumps and CPU-pipeline-flushes?
AFAIK c++ guarantees that in a expression a-expr && b-expr
b-expr
is not evaluated if a-expr
is false
. (Similar is true for or-expressions)
Why does this compiler optimization only occur outside of main?
I have the following C function which multiples two unsigned shorts together and stores the result into an unsigned integer. This function then prints whether the resulting value has the most significant bit set or not.
Why does this compiler optimization only occur within a function?
I have the following C function which multiples two unsigned shorts together and stores the result into an unsigned integer. This function then prints whether the resulting value has the most significant bit set or not.