Closed
Description
I'm not sure about this, it would need to have minimal or no impact on performance when switched off.
Some questions if we are to support it:
- Should we implement
unique
only on the list validator or on tuple, set, frozenset and general iterables as we build the vec? - Should we implement a
unique
check onset
andfrozenset
validators - this would have minimal performance impact as it would involve simply checking that the length of the input before and after creating the set, but sets loose order so won't be sufficient for some scenarios - what's the most performant way to implement this in rust??? I guess for
list[int]
and a few other types, we could do something pretty performant with anAHashSet
but a general case will require some fairly slow python.