removing a redundant call to pred_compute() by storing previous value