SELECT CASES ???
#2
Yucky yuck yuck!

Look close at your code samples.  Count the conditions you check against for point (-1, -1)...

The first does 3 checks for y, 3 checks for x.  The second does 9 checks for y, 9 checks for x. 

6 conditional checks vs 18..  How much slower is the multiple select cases going to be??

Yucky yuck yuck!



To highlight the difference, the first method you posted ADDs the number of possibilities together for how many conditions it may have to check against. The second method that you proposed, has to MULTIPLY the number of possibilities together.

With 10 choices for X and 10 choices for Y, the first method has to make a maximum of 20 condition checks -- while the second could be making up to 100...
With 10 choices for X, Y, and Z, the first method has to make a max of 30 condition checks -- while the second would be making up to 1000...

Do you *really* want to add that type of overhead to your program?
Reply


Messages In This Thread
SELECT CASES ??? - by Pete - 10-16-2022, 07:55 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 08:48 PM
RE: SELECT CASES ??? - by mnrvovrfc - 10-17-2022, 07:40 AM
RE: SELECT CASES ??? - by James D Jarvis - 10-16-2022, 08:49 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:07 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 09:01 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 09:12 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:23 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-16-2022, 09:35 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:57 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 10:28 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-16-2022, 10:44 PM
RE: SELECT CASES ??? - by SpriggsySpriggs - 10-16-2022, 11:06 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 11:42 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 01:34 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 02:04 AM
RE: SELECT CASES ??? - by SpriggsySpriggs - 10-17-2022, 02:46 AM
RE: SELECT CASES ??? - by mnrvovrfc - 10-17-2022, 07:48 AM
RE: SELECT CASES ??? - by dbox - 10-17-2022, 03:46 AM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 05:21 AM
RE: SELECT CASES ??? - by DSMan195276 - 10-17-2022, 06:32 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 06:41 AM
RE: SELECT CASES ??? - by DSMan195276 - 10-17-2022, 07:34 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 08:28 AM
RE: SELECT CASES ??? - by RhoSigma - 10-17-2022, 09:29 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 07:00 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-17-2022, 08:15 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 09:44 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 09:45 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 09:50 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 10:05 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-18-2022, 08:07 PM
RE: SELECT CASES ??? - by Pete - 10-18-2022, 08:38 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-18-2022, 08:49 PM
RE: SELECT CASES ??? - by Pete - 10-18-2022, 09:33 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-19-2022, 06:32 PM
RE: SELECT CASES ??? - by Pete - 10-19-2022, 06:39 PM



Users browsing this thread: 16 Guest(s)