If your HKG arrival/departure coincides with the sailing time of the direct ferry to and from Macau at HKG airport then do it at the beginning or the end.
You will save time as you will be considered in transit to and from Macau and not have to get to the piers in town and deal with entry/exit and the stamps.