Re: quicksorts [Re: List sorting dilemma]
Re: quicksorts [Re: List sorting dilemma]
- Subject: Re: quicksorts [Re: List sorting dilemma]
- From: Nigel Garvey <email@hidden>
- Date: Sun, 28 Jul 2002 00:15:30 +0100
Andy Wylie wrote on Sat, 27 Jul 2002 14:58:10 +1200:
>
The Serge technique just doesn't seem to be required for global purposes
>
where 'my x's item 1' seems simpler, apart from that I see no advantage
>
using 'my' but I'm still interested in cases where the Serge technique
>
offers speed over 'my' as I believe they exist.
I don't know of any such cases. The two techniques are really the same. A
reference form is used to access the list rather than a simple list
variable. References are known to give faster access to list items.
According to Chris Nebel, this is because they bypass certain built-in
safety checks. A reference variable that's set to 'a reference to x' has
the value 'x of <<script>>', which is the same as 'x of me'. My pet
theory for why the Serge technique is even faster than a reference
variable is that a Serge reference is compiled directly into the script
and doesn't need to be got.
Serge's method is only effective when accessing list items by index. It's
actually *slower* than a straight variable when used with terms like 'end
of', 'ends with', 'contains', etc.
NG
_______________________________________________
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.