• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting record items of a sublist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Getting record items of a sublist (From: Nigel Garvey <email@hidden>)
 >Re: Getting record items of a sublist (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Getting record items of a sublist
  • Next by Date: Re: Getting record items of a sublist
  • Previous by thread: Re: Getting record items of a sublist
  • Next by thread: Re: Getting record items of a sublist
  • Index(es):
    • Date
    • Thread