class Set<T> to capsule Dictionary<T, Void>.
Performance much worse!?
changed class Set to struct Set. Changed func count() to property.
Performance back to normal.