Fastest way to do point search?

Blitz3D Forums/Blitz3D Programming/Fastest way to do point search?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Cool! Some speed results:

99 points:
9
9

999 points:
90
73

4999 points:
457
338


...So the second method gets faster when the pointcount increases. But it never gets slower! :)

I guess that if you would sort the point positions (while retaining the index of the original point someway) spatially before searching you could develop even faster method as the sorting is one time only operation (that can be done "during loading"), and does not slow down anything during runtime.