Optimized upper bound.