Re: quicksorts [Re: List sorting dilemma]
Re: quicksorts [Re: List sorting dilemma]
- Subject: Re: quicksorts [Re: List sorting dilemma]
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 26 Jul 2002 16:53:16 -0700
On 7/26/02 4:34 PM, "Andy Wylie" <email@hidden> wrote:
>
on 27/7/02 7:09 AM +1200: Arthur J. Knapp wrote:
>
>
[snip neat script]
>
>
> (* Much thanks to Serge Belleudy-d'Espinose for that
>
> * extra surge of speed. :)
>
> *)
>
>
very nice Arthur! I note Serge object offers no speed over 'my a', where do
>
Serge object outpace 'my'? Nigel? :)
They're the same. You can't use 'my', nor 'a reference to' in a handler
unless the list has been declared a global variable or script property.
Serge discovered that using a script object in a handler worked amazingly
fast, and was actually a little faster than 'a reference to'. Nigel figured
out from general principles (correct spelling) that it seemed to reference
the list the same way 'my' does in a main script or with globals/properties,
tried it, and found out it had identical speed, again a little faster than
'a reference to'. I then discovered (as had Serge, but he hadn't mentioned
it) that the script won't compile with an undeclared property in a script
object in the main script, only in a handler. (You can set it to 'missing
value', as Serge was doing.) Historically, then, Serge made the first
discovery, for handlers, and Nigel found another, easier way for main
scripts. has is trying to turn it inside out if he can. (He can, but it
doesn't speed things up.) And there you have it:
'Serge' for handlers
'Nigel' for main scripts
--
Paul Berkowitz
_______________________________________________
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.