Re: "mylist" vs "a reference to" - speed difference
Re: "mylist" vs "a reference to" - speed difference
- Subject: Re: "mylist" vs "a reference to" - speed difference
- From: Arthur J Knapp <email@hidden>
- Date: Fri, 26 Apr 2002 17:31:20 -0400
>
Subject: Re: "mylist" vs "a reference to" - speed difference
>
From: email@hidden (Michael Sullivan)
>
Date: Fri, 26 Apr 2002 12:15:23 -0400
>
Arthur J. Knapp writes:
>
> repeat ( many ) times
>
> -- In order of average best iterative speed:
>
> --
>
> get/set variableList's item x -- normal item access
>
> get/set aReferenceToList's item x -- explicit saved reference
>
> get/set myScript's propertyList's item x -- "Serge" access
>
> get/set my propertyList's item x -- "Nigel" access
>
But the last 2 are so close that the difference doesn't really matter
>
for most purposes. I don't think "my" is actually any faster. Maybe it
>
depends on what you're doing with the list.
Ya know what, it *doesn't* matter... :)
I now realize that I had gotten myself confused during the flurry of
on and off-list discussions that occured back in March regarding the
faster list access issue. Nigel can properly be credited for showing
that "my", (when used on variables in the global name-space, or within
script objects to refer to properties, etc), produces the *same* effect
as directly referenceing a script object's property. However, there was
no findings to indicate that the "my" technique was faster, not even
marginally.
Hey, this isn't the first time I have ascribed an erroneous statement
to Nigel, is it?
;-)
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www.natural-innovations.com/as/>
on error number -128
end try
}
_______________________________________________
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.