• 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: AppleScript script unable to respond to a script statement correctly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript script unable to respond to a script statement correctly


  • Subject: Re: AppleScript script unable to respond to a script statement correctly
  • From: Deivy Petrescu <email@hidden>
  • Date: Mon, 25 Jun 2018 11:36:13 -0400


> On Jun 25, 2018, at 05:41 , Nigel Garvey <email@hidden> wrote:
>
> <snip>
>> probably faster then
>> this.
>
> Surprisingly, no. There's no measurable difference, of course, when the
> list only contains nine records as here. When it's extended to
> seventy-two discrete records with 'ParagraphPosition' values covering
> all the integers between 1 and 72, I get a pretty constant running time
> of 0.024 seconds when the two lines are removed. It's the same whatever
> the initial order of the records because the script has to do the same
> amount of looping and comparing overall whatever happens.
>
> When the two lines are kept and RecList's length is reduced by 1 every
> time, there are best- and worst-case scenarii. The best is when the
> records are in the required order anyway. In this case the inner repeat
> only ever examines the first record in the list as it exists at the
> time. I get an overall running time of 0.002 seconds when this happens.
> The worst case is when the initial order's the exact reverse of what's
> required. In this case the inner loop has to examine every single
> remaining record every time. Even so, the overall time I'm getting is
> only 0.017 seconds — about two thirds of the time taken when the lines
> are removed and the list isn't shortened. I've no idea why this should
> be.  :/
>

Actually my gut feeling was that it would be faster.
But as you noticed it is much slower. The list with 1000 records ordered from
the 9 up, took 91s with the 2 lines and 153 with the lines removed.

I would risk to guess that this is due to the fact that the comparison is
faster. But it goes against my intuition.
However it is interesting,
>> By the way, congrats on the victory  :-)
>
> Thanks!  :)  But I have to admit that only four of our goals were due to
> England's superior playing skills. The other two were from penalties
> occasioned by the Panamanians' blatant and atrocious fouls! Fingers
> crossed for when we meet the better teams ….
>
> NG

That would be England and Belgium, which I am looking forward to watch.

Deivy Petrescu
email@hidden



 _______________________________________________
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

References: 
 >Re: AppleScript script unable to respond to a script statement correctly (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: AppleScript with FileMaker
  • Next by Date: Re: AppleScript with FileMaker
  • Previous by thread: Re: AppleScript script unable to respond to a script statement correctly
  • Next by thread: Have I posted this??
  • Index(es):
    • Date
    • Thread