(g) comparing the net cost and benefit of the optimization procedure just performed with the net cost and benefit of the previous optimization procedure performed associated with the previous retained checkpoint, and retaining the best net cost and benefit and final checkpoint of the optimization procedure just performed if there is an improved net cost and benefit;