"mylist" vs "a reference to" - speed difference
"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.