Best Practices in Rev development
Scott Kane
scott at cdroo.com
Thu Jun 21 13:41:24 EDT 2007
----- Original Message -----
From: "J. Landman Gay" <jacque at hyperactivesw.com>
> I read somewhere a long time ago that switch statements run faster than
> if/else. I think it was a general comment rather than specifically related
> to Revolution programming but it was so long ago I can't recall. Does
> anyone know if it is true for Rev scripts?
I haven't timed it - but if it's read by the engine in the same manner other
programming languages handle it then it would be faster as any subsequent
conditions are skipped because once the case statement (switch statement) is
met the compiler knows not to proceed - as opposed to if/then/else etc where
the entire handler is evaluated in full.
Scott Kane
More information about the use-livecode
mailing list