Hank, if it works dont fix it. or if it isn't broke, fix it till it is. lol
Seriously, the only thing i would do is make sure and run your test from the bottom up. By this I mean, check for the low count first on up th to highest count. then you can be sure to have enough time.. Something else about your linear search, Y only need to test for 1 condition in each next IF after the first. heres why:
First check establishes a range, say 3800-3900, if this fails, number must be > 3900. next check just needs to look for <4000 cuz you know its >3900. next check if <4200,again because it must be >3900. and so on. Of course my numbers are fictious, but you should get the point. Only checking 1 condition should almost double the execution speed (half the processing).
the code I posted is not complete, it shows how to go through the levels of searching.
Bookmarks