Right now I have tried
Code: Select all
on mouseUp
put field 1 into Temp --field 1 contains about 25K lines
put empty into noDupes
put the milliseconds into timer
repeat for each line theLine in Temp
if noDupes contains theLine is false then
put theLine & return after noDupes
end if
end repeat
delete the last char of noDupes
put (the milliseconds - timer) & return & noDupes
end mouseUp
Code: Select all
on mouseUp
put field 1 into Temp --field 1 contains about 25K lines
put empty into noDupes
put the milliseconds into timer
repeat for each line theLine in Temp
if theLine is not among the lines of noDupes then
put theLine & return after noDupes
end if
end repeat
delete the last char of noDupes
put (the milliseconds - timer) & return & noDupes
end mouseUp
Is there any sneaky way to accomplish this faster? I know that it's grinding because each run through the loop has to compare against an ever increasing list of unique lines, but I can't think of away to avoid that.