> Interesting that 'If' is faster, despite all
> that has been said!
Well not really. Think of it like this
In this example only two checks aximum are made. Only first if the first is true. Now look at this.
If blah=7 then six seperate checks have be made before 7 is reached. SO if you had up to case 100. There are 99 checks before it.
To get around this you would simply order then in the most common order and also split it up.
Then you only have a max of 25 checks.
However I wouldn't worry about it too much. It's not as essential these days to maximum searches in games.
> that has been said!
Well not really. Think of it like this
If blah then else ; do blah endif
In this example only two checks aximum are made. Only first if the first is true. Now look at this.
Select blah Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7 End select
If blah=7 then six seperate checks have be made before 7 is reached. SO if you had up to case 100. There are 99 checks before it.
To get around this you would simply order then in the most common order and also split it up.
If blah<25 Select blah Case 0 Case 1 . . Case 24 End select elseif blah<50 Select blah Case 25 Case 26 . . Case 74 End select elseif blah<75 ;etc else ;etc endif
Then you only have a max of 25 checks.
However I wouldn't worry about it too much. It's not as essential these days to maximum searches in games.