Why are you using a hashmap ?
Hello, I was looking your code to learn how a Quadtree could be implemented in rust (I never did it before in any other language too). But I was wondering why are you using a hashmap for your store ? Wouldn't it be faster with an array ? So your handle would just be a index of you array ? I mean getting a value in a hashmap is O(1) but it's still slower than getting a value in an array.
Hi Luca, thanks for your question.
One reason that I used a hashmap for this project was that it supported the needs I knew of at the time (performant queries, insertion, deletion) without any complexity at all. I suspect that using an array would be faster and simpler in some respects, but I didn't want to think through the complexity of deletes, hanging handles, etc. It might well be the case that an array serves all of these needs just as easily.
I don't have a ton of bandwidth for this project right now but I'd be very happy to review a PR.
Thank you for your response 😃 I'll try to make a pull request if I have time.
Thank you for your repo too, I learned a lot with it.