• 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: COPY TO a list vs. SET TO a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: COPY TO a list vs. SET TO a list


  • Subject: Re: COPY TO a list vs. SET TO a list
  • From: JJ <email@hidden>
  • Date: Tue, 18 Dec 2001 19:28:22 +0100

> --
> set theList to {,
> {"Olivier", 2, 3, 5, 108}, ,
> {"Martin", 17, 19, 20, 21}, ,
> {"Frank", 4, 8, 48}}
>
> set item 2 of theList to item 2 of theList & 6
> copy 57 to end of item 3 of theList
>
> --
>
> What's the better way and why ?

I don't know what's the better, but I'd use COPY method, because (at this
concrete example) seems that "set" way:
__________
Are two operations:

set New_Value to Concatenate_Item_To_List_of_Items
set Some_Reference to New_Value
__________
And, the second one, only one operation:

set Some_Reference to New_Value
_____________
So, the second one is quickly.
Make sense that:

set x to 1
set y to 2

is quicker than:

set {x,y} to {1,2}

So, less code is not more speed nor optimization.

(but seems that "copy" is less code and better speed performance)

JJ


  • Prev by Date: Re: Tex-edit problem !
  • Next by Date: RE: Closing subfolders in Finder window
  • Previous by thread: Re: COPY TO a list vs. SET TO a list
  • Next by thread: Re: Help me---Thank u
  • Index(es):
    • Date
    • Thread