Improved performance of CalcPCwithLag