>Have a conditional statement that checks the most likely condition first. If
>true, then check the next most likely condition.
>
>I could be wrong - and this list has many people capable of proving me
>wrong.

You're not.

I ran some tests about a year ago, and reported them here--they bear out 
your point.

I don't think I have the test movie any more, but I was trying to find out 
which was faster, a case or a series of if/else. I can reproduce it if 
anybody wants--basically, I went through a loop 10,000 times, generating a 
random number, then testing that number.

The results showed the if-then-else to be slightly faster. More striking 
was the difference in speed when doing just what you suggest--put the more 
likely test first, whether in a case or an if-then-else series.

Sorry, Kurt--wish I could argue with you. Maybe another time :-)

Cordially,
Kerry Thompson
Learning Network


[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