by silenz · 10y ago · 0 comments
Check 100 000 entries (4 comparisons each) - > filter out 1% to do expensive calculations on.
Vs
Check 25 cities (4 comparisons each) - > filter out 1/25 Do another easy run on the filtered 4000 and get the same areas to do expensive calculations on as above.
That's 25+4000 easy calculations against 100 000.
But yeah, I'm not sure why they seem to go the hard route from the beginning.
If you have a nested series of rectangular bounding boxes you're well on your way to building an R-tree.