Table of Contents Previous topic Next topic
C/C++ COMPILER->Compiler command line options->Conditional Branch Elimination (/Ob)
The /Ob option tells the compiler to consider the use of conditionally executable instructions instead of branches.
Branching around a few instructions can have an impact on the instruction pipeline and so can be slower than processing the same instructions but not executing them.
Consider the code generated for the C library abs() function.
With only stack frame pointer elimination enabled, the following code is generated:
With stack frame pointer elimination enabled and conditional branch elimination enabled, the following code is generated:
The branch has been removed and the RSB instruction has been replaced with the RSBLT instruction.