• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What is Best Method To Determine Duplicate Items in a Large List?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: What is Best Method To Determine Duplicate Items in a Large List?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: What is Best Method To Determine Duplicate Items in a Large List?
  • Next by Date: Quicktime replacement?
  • Previous by thread: Re: What is Best Method To Determine Duplicate Items in a Large List?
  • Next by thread: Re: What is Best Method To Determine Duplicate Items in a Large List?
  • Index(es):
    • Date
    • Thread