Fastest way to `unique!`

Use an OrderedSet, only insert new elements, collect when done.

also preserves order AFAIK and has a cool API to avoid hash table lookups twice.

1 Like