Re: are finder items items? what is a vector?
Re: are finder items items? what is a vector?
- Subject: Re: are finder items items? what is a vector?
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 27 Dec 2009 21:13:12 -0800
- Thread-topic: are finder items items? what is a vector?
On 12/27/09 3:41 PM, "Shane Stanley" <email@hidden> wrote:
>> I believe certain types of operations were quicker with linked lists, but
>> generally it wasn't too useful. Anyway, the distinction was removed shortly
>> after.
>
> I'm not sure anything was removed. For example:
>
> set time1 to current date
> repeat 100 times
> set x to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
> repeat 12 times
> set x to x & x
> end repeat
> end repeat
> set time2 to current date
> repeat 100 times
> set x to {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
> repeat 12 times
> set x to x & x
> end repeat
> end repeat
> set time3 to current date
> return {time2 - time1, time3 - time2}
Well, this is a case where "regular" lists (vectors) are (now) much faster
than linked lists, at least OMM (OS 10.5.8). So I guess you mean that this
indicates that [] linked lists are still different from regular {} lists in
some way. Yes, that must be so. I'm sorry, but I can't actually recall what
was the different functionality that linked lists originally provided.
Perhaps it was not speed at all, but something else. (I have this vague
notion of something to do with indexing - first item, middle item, etc. -
though again that would seem to be something that directional vectors would
have provided exclusively.) As I said earlier, I thought that there had once
been some context where [] was *faster*, not slower, than {}. Whatever it
was may well no longer be the case - presumably there have been
optimizations to the current language - {} - which deprecated elements - []
- might not have benefited from.
Anyway, I'm sorry to be so vague. I read about this once, in a historical
narration somewhere, but don't know where to research it now. Jon Pugh, who
was there, may know definitively. Or Chris Nebel.
--
Paul Berkowitz
_______________________________________________
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