Re: Speed & Choose from list
Re: Speed & Choose from list
- Subject: Re: Speed & Choose from list
- From: has <email@hidden>
- Date: Wed, 8 May 2002 20:49:53 +0100
Arthur J Knapp wrote:
>
> On lists that store a lot of information, and might contain, say 1000 or
>
> 10,000 items, the efficiency of using tids to get the O(n) constant down
>
> at machine level, or of the log(n) binary search algorithm would make
>
> itself known.
>
>
With regard to the very large, it should be pointed out that tids-
>
processing is subject to a coercion limit
Not an issue with a tid-based string search where all items are unique.
i.e. 'count text items of theString' won't throw an error even when there's
more than 4000 text items in that string. [Sometimes it's a major relief
that not everything in AS is an immediate, explicit 'get'. I just wish this
same referencing behaviour didn't cause obsure and sometimes serious
glitches at other times...]
Also, this limit can be worked around quite easily if it is a potential
risk [see everyItemLib, stringLib blah blah blah...].
>
The
>
contains operator certainly has limits when it's operands are strings,
>
(32k)
Again, this can be worked around if necessary.
[Though I really do wish all these problems would just hurry up and go away
- this need for so many workarounds gets terribly tedious.]
>
so it is likely that some similar limit is true for lists.
Just because string objects are subject to bugs, glitches and shortcomings,
it doesn't automatically follow that lists are subject to the same sort of
problems.
In fact, I'd bet that list objects are perfectly capable of developing
their own bugs, glitches and shortcomings *completely independently*!
There's never a dull moment with AppleScript, y'know...;)
has :)
--
http://www.barple.connectfree.co.uk/ -- The Little Page of Beta AppleScripts
_______________________________________________
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.