Performance?

Jump to navigation Jump to search
Revision as of 22 December 2011 at 07:12.
The highlighted comment was created in this revision.

Performance?

I'm curious, have you measured the performance of this r-tree? During my extensive nearest neighbor search experiments in the past, I did make an attempt at an r-tree, but I found at least my impelementation to provide far inferior performance to my bucket kd-tree.

    Rednaxela21:24, 20 December 2011

    Yes. Now this tree in battles against Diamond in average takes 56,800 ns for RS. I know that it's not completly correctly to compare them, but yours kD-Tree do kNN with same k in about 70,000-80,000 ns. RS & kNN are performed more than 3000 times with 30 trees with 1-5 dimensions and 0- ~3200 points.
    I plan to try use RS with dinamically calculate hypercube side in gun, which, i hope will produce pretty equal results with kNN, and in this case i will publish comparsion of RS & kNN for gun

      Jdev06:24, 21 December 2011
       

      How about seeing how many points are returned by the RS, and seeing how long it takes with that many points for kNN in comparison?

      I've been considering testing RS in DrussGT instead of all of those movement buffers, but I'm too busy at the moment...

        Skilgannon09:33, 21 December 2011
         

        I did the exactly same. Something like this: E[] arr1 = rTree.rangeSearch(getRange(currentLoc)); E[] arr2 = kDTree.nearestNeighbor(currentLoc, arr1.length)

          Jdev10:50, 21 December 2011
           

          I'm curious, the does the RS give the same results? Or does the kNN return points in a hypersphere, whereas the RS gives results in a hypercube?

            Skilgannon12:00, 21 December 2011
             

            Now i'm curious too, but i hope, that results will pretty same:) I will publish results, when i will try it

              Jdev12:03, 21 December 2011

              Hmm... that performance difference is fairly expected. kNN spends a lot of time doing distance calculations that RS doesn't need to do. Also, just a note.... I think the questions of using r-trees vs kd-trees should be separate from whether RS or kNN is used. I say that because well... both types of trees can do both types of searches.

                Rednaxela22:11, 21 December 2011
                 

                I completely agree with you. But i think, that r-tree is faster with RS, but kD-tree is faster with kNN

                  Jdev05:32, 22 December 2011

                  That's an interesting theory, could perhaps be the case. I might test that some time.

                    Rednaxela08:12, 22 December 2011