Re: really slow repeat loop
Re: really slow repeat loop
- Subject: Re: really slow repeat loop
- From: "Shane Stanley" <email@hidden>
- Date: Wed, 19 Jan 2005 12:51:39 +1100
On Tue, 18 Jan 2005 17:37:53 -0800, Andrew Oliver wrote:
>> set end of user_list to username
>> end if
>> end repeat
>>
>>
>
>As has been covered many times before, when appending to a list it is far,
>far faster to:
>
> copy username to end of user_list
>
>Since it involves less memory moving, especially with large lists.
Really? This suggests otherwise:
set x to {}
set time1 to current date
repeat with i from 1 to 2000
copy i to end of x
end repeat
set time2 to current date
set x to {}
set time3 to current date
repeat with i from 1 to 20000
set end of x to i
end repeat
set time4 to current date
{time4 - time3, time2 - time1}
--
Shane Stanley <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden