• 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
"mylist" vs "a reference to" - speed difference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"mylist" vs "a reference to" - speed difference


  • Subject: "mylist" vs "a reference to" - speed difference
  • From: "charles" <email@hidden>
  • Date: Thu, 25 Apr 2002 22:21:45 +0100

I hadn't heard about "mylist" as a variant on "a reference to" for dealing
with lists.

However my tests (OSX) suggest it's a lot slower:

set thelist to {}
set isalist to my thelist
set list2 to {}
set list3 to a reference to list2

set starttime to current date
repeat 2000 times
set end of isalist to "2"
end repeat
set endtime to current date

set twostart to current date
repeat 2000 times
set end of list3 to "2"
end repeat
set twoend to current date
{(endtime - starttime), (twoend - twostart)}

I find that mylist is slower, by a factor of 2.

Charles

--
http://www.ukclimbing.com : 1,000+ British crags, 350+ British climbing walls
- searchable by distance rock type, etc, with 5-day weather forecasts for
every one - plus maps, articles, news, and the New Routes database. There's
even a cool shop attached...
_______________________________________________
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.

  • Follow-Ups:
    • Re: "mylist" vs "a reference to" - speed difference
      • From: email@hidden (Michael Sullivan)
    • Re: "mylist" vs "a reference to" - speed difference
      • From: Malcolm Fitzgerald <email@hidden>
  • Prev by Date: Acrobat scripting
  • Next by Date: Re: Default or optional arguments to handlers
  • Previous by thread: Re:Acrobat Scripting
  • Next by thread: Re: "mylist" vs "a reference to" - speed difference
  • Index(es):
    • Date
    • Thread