Re: Getting record items of a sublist
Re: Getting record items of a sublist
- Subject: Re: Getting record items of a sublist
- From: Alex Zavatone <email@hidden>
- Date: Sun, 30 Oct 2011 12:59:16 -0500
On Oct 30, 2011, at 11:50 AM, Christopher Stone wrote: On Oct 30, 2011, at 06:41, Nigel Garvey wrote: This takes about 0.02 seconds:
repeat with i from 1 to (count theNameList) set theItem to myname of item i of my theNameList -- NB. 'theNameList' is referenced (with 'my'). set end of my theChooseList to theItem -- Ditto 'theChooseList'. end repeat ______________________________________________________________________
Hey Nigel,
My, my. That's a whopper of a difference.
0.008 seconds here on my i7 MacBook Pro
Outstanding little trick - any idea of why it works?
Yes. you are pointing to where a value already exists. It's pointer based, instead of incurring the overhead of allocating and duplicating the variable (string therein). |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden