I often use your kdbush module for this, is there a case where flatbush is better for static points?
I think kdbush should always be faster for points — it uses more than 2x less memory, because when you encode points as bounding boxes, you basically duplicate them. Indexing and search is faster mostly because you operate on less data.
BTW, the readme of kdbush and flatbush don't mention each other. Might be nice if they do and clarify how they compare.
(because sometimes, people have an older, not updated library, for example)
Good point, thank you! I'll interlink those.
So is it multithreaded? If so, how many cores does it scale to till it hits other bottlenecks? Does it load the cores to 100%?
No, it's single-threaded (it's pure JavaScript after all), but you can index data on a worker thread and then transfer the index instantly to the main thread for search queries. I don't think the algorithm needs parallelization — isn't worth the complexity, it's already fast enough.
This will immediately make my project faster, thank you kind stranger!