Rewrite dedupIDs to not take up *4%* of processing time.