Stefan Monnier writes: >> So should `cl-remove-duplicates' be a 2-in-1 (lists for small input, > > Don't know/don't care about cl-remove-duplicates, but for delete-dups, I'd > welcome a patch which switches to a hash-table after the Nth element. I attach the patch. I did a bunch of `benchmark-run' and it seems that 100 elements is the breaking point. > PS: BTW, helm-fast-remove-dups's docstring says: > > This is same as `remove-duplicates' but with memoisation. > > but it doesn't actually use memoization, AFAICT. It does in a way, for an optimized-out "is-element-in-collection" function. Oleh