• 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: Passing *possible* variables to a handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Passing *possible* variables to a handler (From: has <email@hidden>)

  • Prev by Date: Re: Hey ! option-double-click reveals attachments!
  • Next by Date: Fwd: Re: Passing *possible* variables to a handler
  • Previous by thread: Re: Passing *possible* variables to a handler
  • Next by thread: Re: Passing *possible* variables to a handler
  • Index(es):
    • Date
    • Thread