3 ms·
Depends on which is more important. If it's an egregious error for there to be more than one element then I'd prefer the unpacking solution. However if orderi
by digitallogic 16y ago
Depends on which is more important. If it's an egregious error for there to be more than one element then I'd prefer the unpacking solution. However if ordering is/was involved at some point a set would indicate a possible bug (since they're unordered) so I might lean towards indexing.
They are both decent ideas, not hard fast rules. Let your context be your guide.