slightly better impl of distinct (less hashing). #97