speed up cmp_branch_inner()