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: "Nigel Garvey" <email@hidden>
- Date: Mon, 14 Aug 2017 13:53:07 +0100
Shane Stanley wrote on Mon, 14 Aug 2017 21:32:29 +1000:
>> 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.
Even at my age, I could afford to wait an extra 0.0675 seconds to find
out the dupes in a 30,001-item list. ;) And I wouldn't be limited to a
list containing only text values in lexical order. :)
>Or:
>
>duplicatedValues's intersectSet:countedDupes
Ah. Missed that. Much better. Thanks. :)
NG
_______________________________________________
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