• 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: Sifting a list sans loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sifting a list sans loop


  • Subject: Re: Sifting a list sans loop
  • From: "Jason W. Bruce" <email@hidden>
  • Date: Tue, 29 Jan 2002 18:41:53 +0000

Marc K. Myers asked:

> Is there a limit to list size, other than available memory? Why does
> adding items to the end of a list get slow when the list is large?

It could be because the list has become so large that it has to be shuffled
around in memory several times to complete the appending of new items.
Below is an excerpt from Chris Nebel from a post a few weeks back explaining
the difference between copy and set with lists.

> --Chris Nebel
> AppleScript Engineering
>
> [1] Astute readers will realize that AppleScript has to copy the list
> at least sometimes, because there might not be room for the new
> element. AppleScript currently grows lists by 16 slots at a time, so
> you only need to copy the list once for every 16 appends, instead of
> every time with concatenation. (Yes, I know that a different
> algorithm -- e.g. doubling the slots -- would be more time-efficient.
> I'm working on it.)

Jason Bruce


  • Prev by Date: Re: The Great Module Debate :) [was Re: solutions to scripting
  • Next by Date: OS X - Make new Finder window bug
  • Previous by thread: Re: Sifting a list sans loop
  • Next by thread: Re: Problems with speed & issues with coercion in OS 9.2.2
  • Index(es):
    • Date
    • Thread