On Tue, Sep 22, 2009 at 5:48 AM, Richmond Mathewson <[email protected]> wrote: > I have to use either: > > 1. A multi-case switch statement with many sub-switch statements inside it, > > or > > 2. A multi-case switch statement with many IF . . . THEN statements inside > it, > > or > > 3. Many IF . . . THEN statements with many IF . . . THEN statements inside > them. > > Number 3. is obviously going to slow things down a ton! > > Should I choose 1. or 2 ? and why?
My usual rule is to use "if" for 2 or 3 options and "switch" if there are more optins. You can apply that to your embedded decisions also. I don't think you will notice much speed difference either way, so concentrate on making readable code that you can understand when you come back to it in a year's time. Cheers, Sarah _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
