• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining item number matching "x" in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Determining item number matching "x" in a list
      • From: John Delacour <email@hidden>
    • Re: Determining item number matching "x" in a list
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Active Application
  • Next by Date: Re: Determining item number matching "x" in a list
  • Previous by thread: Re: Determining item number matching "x" in a list
  • Next by thread: Re: Determining item number matching "x" in a list
  • Index(es):
    • Date
    • Thread