  We optimize the running time of the primal-dual algorithms by optimizing
their stopping criteria for solving convex optimization problems under affine
equality constraints, which means terminating the algorithm earlier with fewer
iterations. We study the relations between four stopping criteria and show
under which conditions they are accurate to detect optimal solutions. The
uncomputable one: ''Optimality gap and Feasibility error'', and the computable
ones: the ''Karush-Kuhn-Tucker error'', the ''Projected Duality Gap'', and the
''Smoothed Duality Gap''. Assuming metric sub-regularity or quadratic error
bound, we establish that all of the computable criteria provide practical upper
bounds for the optimality gap, and approximate it effectively. Furthermore, we
establish comparability between some of the computable criteria under certain
conditions. Numerical experiments on basis pursuit, and quadratic programs
with(out) non-negative weights corroborate these findings and show the superior
stability of the smoothed duality gap over the rest.
