• 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: Unique Items in a text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unique Items in a text file


  • Subject: Re: Unique Items in a text file
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 09 Apr 2002 06:04:02 -0700

On 4/8/02 3:45 PM, "has" <email@hidden> wrote:

> Purely as an exercise in seeing how well vanilla code can perform, I found
> the following ran through a 10,000 line, 4.4MB test string in 15 secs on my
> G3/300.
>
> ======================================================================
>
> on _extract(theString, columnIndex, resultList) --private stuff
> repeat with y from 1 to count theString's paragraphs
> theString's paragraph y's text item columnIndex
> if result is not in resultList then
> set resultList's end to result
> end if
> end repeat
> end _extract


Is it faster if you don't force it to do the string-to-single-item-list
coercion? (A genuine question: apparently coercions can sometimes be
quicker):

if {result} is not in resultList then

is the syntactically correct statement.

--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Unique Items in a text file (From: has <email@hidden>)

  • Prev by Date: Valentina
  • Next by Date: Re: Unique Items in a text file
  • Previous by thread: Re: Unique Items in a text file
  • Next by thread: Re: Unique Items in a text file
  • Index(es):
    • Date
    • Thread