Optimize branches in the evaluator