Best Practices in Rev development

Kay C Lan lan.kc.macmail at gmail.com
Thu Jun 21 20:31:54 EDT 2007


On 6/22/07, J. Landman Gay <jacque at hyperactivesw.com> wrote:
>
>
> Brian, you are absolutely right. I changed the test to string constants
> with four conditions and it was break-even. I knew there had to be
> something wrong with my test the results were too different.


Yes there was a Switch vs If-Then-Else Thread on this List a while back. I
might see if I can track it down. The end result was that, when you were
talking thousands of iterations, in some cases Switch won, in other case
If-Then-Else won. If I remember correctly such factors as, numbers, strings,
expressions requiring evaluation, and order of operation all had an effect
on the result.

I think the conclusion was:
1) If speed was your ultimate goal, then you'd need to run tests and go with
whatever came out as the winner.
2) If 1000s of hits were not involved then it would be impossible for anyone
to notice the difference so go with whatever you're comfortable with.



More information about the use-livecode mailing list