use faster inlined bisection