Re: Unique Items in a text file
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.