Computing the full cost function requires communications and reductions overhead which may not be needed.