For my distances code, I have the following results:
As you can see, the actual calculations seem to be correct, and it takes very little time to build the tree. However, the actual time to calculate the point squared distances between queries and the AABB tree are enormously long.
Has anyone come across a similar issue? I am wondering if this might primarily be due to how I use the priority queue? I can't think of any other reason why this might be happening, since my tree is relatively balanced, and there is no recursion happening. The only loop I have is a while loop checking whether or not the queue is empty. However I use a custom comparator to work on the pairs.
For my distances code, I have the following results:
As you can see, the actual calculations seem to be correct, and it takes very little time to build the tree. However, the actual time to calculate the point squared distances between queries and the AABB tree are enormously long.
Has anyone come across a similar issue? I am wondering if this might primarily be due to how I use the priority queue? I can't think of any other reason why this might be happening, since my tree is relatively balanced, and there is no recursion happening. The only loop I have is a while loop checking whether or not the queue is empty. However I use a custom comparator to work on the pairs.