Re: jmlbeud ceararhtcs
Re: jmlbeud ceararhtcs
- Subject: Re: jmlbeud ceararhtcs
- From: Deivy Petrescu <email@hidden>
- Date: Tue, 23 Sep 2003 19:25:23 -0400
On Tuesday, Sep 23, 2003, at 10:53 US/Eastern, Arthur J. Knapp wrote:
Here is an example of calling "random number" just once, and then
mathematically modifying that value repeatedly:
And here are some better, and certainly easier to use methods:
(* One osax call during compilation, and any value to
* modify it:
*)
snip
(* Speed Test:
*)
set iterations to 100000 -- 100,000
set t0 to current date
repeat (iterations) times
random number
end repeat
set t1 to current date
repeat (iterations) times
Randy()
end repeat
set t2 to current date
{t1 - t0, t2 - t1} --> {104, 3}
using this script in Smile and using chrono instead, here is what I got:
{1.624889999999, 6.164897000002}--100,000 it
{0.233650000002, 0.979487999997}--10,000 it
{0.02003, 0.100611000002}--1,000 it
{0.002363, 0.012092000004}--100 it
{9.86999999440741E-4, 0.001337000002}--10 it
{4.7900000208756E-4, 5.06999997014645E-4}-- 1 it
{3.85999999707565E-4, 6.27000001259148E-4} -- 1 it
{3.78999997337814E-4, 4.77000001410488E-4} -- 1 it
{3.80999998014886E-4, 4.7900000208756E-4} -- 1 it
{3.75000003259629E-4, 4.80999995488673E-4} -- 1 it
{4.24000005295966E-4, 4.79999995150138E-4} -- 1 it
longer times for the osa call.
Michael Sullivan had had a more robust and fully featured means
of quickly and repeatedly generating random numbers, but I seem to
have misplaced his script, and AppleMods, (where he had released
it), doesn't seem to be in existance any more. I am also unable to
get a hold of Greg Strange. Does anyone know anything about him?
I really do mot see any problem with your RN generator. It seems robust
and fully featured to me.
Which, of course, does not preclude you from asking about anybody... :)
Regards
Deivy Petrescu
http://www.dicas.com/
_______________________________________________
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.