Nearby is released! A lightweight library that finds nearby objects in constant time

Hey @oguzeroglu,

Thanks for sharing a useful tool with the community.

Unless I’m forgetting my algorithmic complexity knowledge, O(1) is constant complexity. Your table on the repo doesn’t reflect that, it reflects some kind of O(log(n)) complexity perhaps.
image
I mean, if you solve the spatial locality search problem like that - i think it would be awesome.

If you split the whole space into small boxes (bins), then unless you assume uniform distribution as well as constant relationtionship between number of boxes and number of objects - your O(1) claim is… a bit off

I’m all for new things and for trying out various approaches. Though.

About GC, my engine meep is super GC-aware, and the spatial index in there has 0 GC overhead, not “little” but 0, when it comes to moving things around.

You make claims that put work of others in the negative light. Personally, I don’t think that my spatial index is overall better than yours, they serve different purposes and have their advantages and disadvantages. I like your stuff, and I hope this doesn’t come off as overly negative.