Re: Passing *possible* variables to a handler
Re: Passing *possible* variables to a handler
- Subject: Re: Passing *possible* variables to a handler
- From: email@hidden (Michael Sullivan)
- Date: Wed, 17 Jul 2002 15:32:55 -0400
- Organization: Society for the Incurably Pompous
>
Incidentally, had an interesting thought/question about the way AS
>
reallocates a list in memory as it grows. Chris N explained a while back
>
that it's reallocated for every 16 items added; each time adding enough
>
extra room for another 16 items before. Which got me wondering: why doesn't
>
AS allocate twice as much extra space that was previously allocated,
>
trading some memory efficiency for improved speed? Secondary to the O(1) vs
>
O(n) issue, but perhaps still something to ponder on...
Ah, this explains why the "set end of aList to blah" operation is
actually O(n), though the coefficient of the n term is small enough to
be dwarfed by the constant until one gets into creating very large
lists. You don't notice the O(n) behavior until around 3-4000 items.
Michael
--
Michael Sullivan
Business Card Express of CT Thermographers to the Trade
Cheshire, CT email@hidden
_______________________________________________
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.