Re: What is Best Method To Determine Duplicate Items in a Large List?
Re: What is Best Method To Determine Duplicate Items in a Large List?
- Subject: Re: What is Best Method To Determine Duplicate Items in a Large List?
- From: Shane Stanley <email@hidden>
- Date: Mon, 14 Aug 2017 21:32:29 +1000
On 14 Aug 2017, at 8:58 pm, Nigel Garvey <email@hidden> wrote:
>
> An alternative would be to get an ordered set from the original array
> and to filter it for values which occur in the counted duplicates. This
> should ensure that the results are returned in the order the values
> first occur in the original list, whatever that order may happen to be.
Right -- but it is going to be about 25% slower.
>
> set predicateForBeingInCountedDupes to current application's NSPredicate's
> predicateWithFormat:("self IN %@") argumentArray:({countedDupes})
> duplicatedValues's filterUsingPredicate:(predicateForBeingInCountedDupes)
Or:
duplicatedValues's intersectSet:countedDupes
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden