Re: Determining item number matching "x" in a list
Re: Determining item number matching "x" in a list
- Subject: Re: Determining item number matching "x" in a list
- From: Steve Cunningham <email@hidden>
- Date: Fri, 14 Mar 2003 05:49:46 -0500
Emmanuel wrote:
...
>
(follow-up of my previous mail)
>
>
NG's "getindex" requires 170 +or- 25 microseconds
>
My "IndexOfItem" requires 809 +or- 37 microseconds
Wow! The binary search really cuts it down for a long list. Two
observations:
- "... item is in the list" must fly... how hard could it be to return
which item ? :-)
- the best strategy would seem to be a hybrid that uses a different
routine depending on the length of the list.
What are you using to get the timings? I use "GetMilliSec" (I don't know
who wrote it... the documentation is in Japanese). I see you are getting
*micro* seconds... is my Lombard really that slow?
Someone *has* to have written an osax for this.
Steve
_______________________________________________
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.