no-dups: faster variant of distinct