I'll answer the other part of your question.  There is no speed 
difference between different type of scripts.

When trying to evaluate speed of execution of different methods, the 
standard approach is to build a quick test and compare.  For your 
question, I tried this:

on speedTest
   startTime = the milliseconds
   repeat with i = 1 to 100000
     a = random(100)
     b = a * a
   end repeat
   put "a*a:" && the milliseconds - startTime

   startTime = the milliseconds
   repeat with i = 1 to 100000
     a = random(100)
     b = power(a, 2)
   end repeat
   put "power(a, 2):" && the milliseconds - startTime

end

And got the following result:

-- Welcome to Director --
speedTest()
-- "a*a: 427"
-- "power(a, 2): 642"

Looks like multiplication is faster.

Welcome to Lingoland!

Irv

At 10:24 AM +0200 7/3/01, Chris Aernoudt wrote:
><snip>
>
>Is there a line execution speed difference between movie and stage scripts?
>
>which one is faster - a*a or power (a,2) ?
>(In c it's the latter, but I am not so sure about lingo.)
>

-- 

Lingo / Director / Shockwave development for all occasions. 
          
   (Home-made Lingo cooked up fresh every day just for you.)

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to