• 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: Silly question?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silly question?


  • Subject: Re: Silly question?
  • From: John Delacour <email@hidden>
  • Date: Wed, 20 Aug 2003 15:07:56 +0100

At 2:17 pm +0100 20/8/03, John Delacour wrote:

The first routine takes 36 seconds, the second 0.7 seconds. This does not prove the point in queston because there are other factors, but it certainly proves there's a difference with something and for _anything_ to take 36 seconds to process 1000 things seems to me quite crazy.


A simpler example is this. For 1000 items in ls the time is long but not frightening, but the time taken increases exponentially as the number of items in the list is raised. To get a true timing you need to run the script twice to avoid the building of the list.



property ls : {}
if ls is {} then
repeat with i from 1 to 1000
set end of ls to i
end repeat
end if
set t to GetMilliSec
repeat with i in ls
contents of i
end repeat
set t1 to ((GetMilliSec) - t) / 1000

JD




.
_______________________________________________
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: Silly question? (From: Shane Stanley <email@hidden>)
 >Re: Silly question? (From: John Delacour <email@hidden>)

  • Prev by Date: Re: combining Applescript and CLI/cron jobs
  • Next by Date: Find and FBC in 10.2 ?
  • Previous by thread: Re: Silly question?
  • Next by thread: Re: Silly question?
  • Index(es):
    • Date
    • Thread