Re: Passing *possible* variables to a handler
Re: Passing *possible* variables to a handler
- Subject: Re: Passing *possible* variables to a handler
- From: Andy Wylie <email@hidden>
- Date: Sat, 20 Jul 2002 15:45:43 +1200
on 20/7/02 4:39 AM +1200: has wrote:
>
Andy Wylie wrote:
>
>
>> set v to Hamish's GetAt(5)
>
>> --
>
>> set v to Hamish's item 5
>
>>
>
> I find Hamish slow either way
>
>
Odd. The latter of the above forms gives the dreaded O(n) performance as
>
expected, but the former should be O(1) [constant access time], and at a
>
decent enough clip unless somebody's fubared the code someplace(?).
it were Arfa unwrapped it...
script
property parent : a
on GetAt(x)
return my item x
end
end
set Hamish to result
>
the original code - give it a try; if you still find its performance
>
subpar, let me know.
>
Yes that's much better :)
10*10*10000 [1] on10000 item list --> {Hamish's GetAt(5),Hamish's parent's
item 5}-->{{0.4016955}, {0.228115}}
>
Cheers,
>
yeah, good thread!
>
has (I'm not slow, I'm just "methodical")
>
ooer, I though Arthur was refering to some imaginary pet or little helper
being.
_____________________________ Andy
[1] .047 (10* average) error
_______________________________________________
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.