• 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: processing time & stack overflow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: processing time & stack overflow


  • Subject: Re: processing time & stack overflow
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 28 Aug 2001 09:06:25 -0700

On 8/28/01 8:49 AM, "Paul Skinner" <email@hidden> wrote:

> on 8/28/01 11:05 AM, Arthur J Knapp wrote:
>
>> on NewOrder(lst)
>> set {s1, s2, len} to ,
>> {random number from 1 to 100000, 31415, lst's length}
>> repeat with i from 1 to len
>> set {j, s1} to {(s1 mod len) + 1, (s1 * s2) mod len}
>> set {lst's item i, lst's item j} to ,
>> {lst's item j, lst's item i}
>> end repeat
>> end NewOrder
>>
>> set lst to {"a", "b", "c", "d"}
>>
>> NewOrder(lst)
>>
>
> Nice. I'm still digesting it. You do want to return the value of 'lst'
> at the end though.
> I don't see any OSAX calls. Was that in the previous version you mention?


'random number' is an osax call from Standard Additions. It's not a
3rd-party osax, but it is an osax nevertheless. Arthur mentions it because
osax calls, to Standard Additions as to any other osax, are somewhat
time-and-memory-demanding if you are going to repeat it thousands of times,
and if you're counting (Arthur is always counting).

--
Paul Berkowitz


References: 
 >Re: processing time & stack overflow (From: Paul Skinner <email@hidden>)

  • Prev by Date: Re: COLOR MIXING
  • Next by Date: Is it possible...
  • Previous by thread: Re: processing time & stack overflow
  • Next by thread: Re: processing time & stack overflow
  • Index(es):
    • Date
    • Thread