Speeded up meanDiff and meanPctDiff functions