boost performance by delaying branching