>How is the speed of the lingo function value()? If I really hammer it
>(several hundred calls a frame) will it slow me down a lot?

That's easily tested:

on exitFrame
   piString = "3.1415926"
   m = the milliseconds
   repeat with a = 1 to 10000
   end repeat
   put the milliseconds - m
   m = the milliseconds
   repeat with a = 1 to 10000
     p = piString
   end repeat
   put the milliseconds - m
   m = the milliseconds
   repeat with a = 1 to 10000
     p = value(piString)
   end repeat
   put the milliseconds - m
end


The results on my machine shows that a 10000 repeat takes 26 
milliseconds, a transfer of a string to a variable takes 52 
milliseconds (26 of which is the repeat loop), and the value repeat 
takes about 930 milliseconds (26 of which is the repeat loop).

That ends up being disturbing! It suggests my machine can only do 
about 11000 values a second. I suppose that if you wanted a 10 fps 
rate for your movie, and needed to do 1100 values per frame, you 
would be in trouble.

Are you sure you need to use value every time? Can't you keep the 
things that don't change as normal variables, after doing value() 
once?


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/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