I'm looking at Swift Set operations, and notice the time complexity is not ducmented, e.g. for insert(), remove(), and contains()
I see Set adopts Hashable, which means I could assume Set.contains() is O(1), but for remove() and insert(), I'm not quite sure whether it's O(1) or could be O(n).
Should be this one, which is just a pair of find and remove. Looks like it's a regular hash table with some probing, so you could say that these operations are O(1)on average.
The filename is usually quite telling. If you narrow down to files with Set in their names, it's not hard to spot SetVariant.swift. Even if not, it'd help reducing the number of files by a lot.