• 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: Emmanuel <email@hidden>
  • Date: Sat, 15 Mar 2003 11:26:33 +0100

At 2:51 AM +0000 15/03/03, Nigel Garvey wrote:

Well. After all the discussion, I just had to compare the two myself on
my own Pismo 400MHz. Necessarily, this was in 9.2.2 in order to use 'the
ticks'.

Your testing under OS9.2.2 is very interesting, yet I'm not sure I understand what your statement above means. Under OSX, Smile proposes "chrono" which is far more accurate than 'the ticks'.

(Smile for OS9 also includes "chrono". That "chrono" is just as accurate as 'the ticks', but you save the overhead (is that how you say?) implied by calling an osax.)

--> {Binary:{5, 6, 10, 13, 17, 18, 21, 18, 21, 25, 24, 17, 21, 23, 27,
26, 25, 27, 30, 29}, TIDs:{11, 11, 11, 11, 12, 11, 11, 11, 12, 11, 11,
11, 13, 11, 11, 11, 11, 12, 11, 11}}

This says something about how the OS9 and OSX (10.2.1) compare one to each other in terms of speed, since we've got the same machines exactly.

===
"Binary" is 9 times faster under OSX than under OS9
===

===
"TIDs" is 12 times faster under OSX than under OS9
===

That said, the TIDs method is - as I mentioned yesterday - only good for
text and is case-sensitive. My binary search, as it stands, is
handicapped speedwise by being case-insensitive.

[Still, on my example 20 items long:]

===
"TIDs" case sensitive is 2.5 times faster than "Binary" case insensitive
===

When I make "TIDs" case sensitive (by "uppercasing" both strings), it slows down by 50%, so:

===
"TIDs" case insensitive is 1.6 times faster than "Binary" case insensitive
===

Emmanuel
_______________________________________________
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.

References: 
 >Re: Determining item number matching "x" in a list (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Distinguishing scriptlets for Apple Events
  • Next by Date: Re: Active Application
  • 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