Many thanks to Tim for suggesting isSubset, which I had somehow missed
while browsing the documentation.
To answer Dave's questions: unfortunately the Set comparisons aren't an
ideal candidate for asynchronous work. The comparisons take place as part
of a CSS-like styling phase, whereby a number
> On Nov 13, 2016, at 1:58 PM, Nial Giacomelli via swift-users
> wrote:
>
> Using Swift 3 I have a function that's called extremely frequently and is
> appearing regularly in Profiler runs. The function takes two Set
> instances and simply attempts to determine whether
guard a.isSubset(of: b) else { return false }
This should be the most efficient way to do what you’re trying to do.
> Using Swift 3 I have a function that's called extremely frequently and is
> appearing regularly in Profiler runs. The function takes two
> Setinstances and simply attempts to
Using Swift 3 I have a function that's called extremely frequently and is
appearing regularly in Profiler runs. The function takes two Set
instances and simply attempts to determine whether all items from Set A are
present in Set B (it's important to note that Set B may well contain
additional