- Sep 19, 2000
- 10,286
- 147
- 106
I have a vector filled with points, sometimes it can be very large, other times it can be very small. As it stands, I am using a radix sort. It works, but I am using a couple of lists to do the sort (they are from the STL).
So when I do a profile of the program, the place where I am spending most of my time on this function is calling the new command in the lists. Well, that won't due
, So what data structure would you recommend? The radix sort is going to be the fastest way to sort the points (and has been the fastest that I have implemented thus far).
As a small note, I am sorting by distance. from a given point.
*edit* How about a map and just let it do the sorting? that actually might be quicker
So when I do a profile of the program, the place where I am spending most of my time on this function is calling the new command in the lists. Well, that won't due
As a small note, I am sorting by distance. from a given point.
*edit* How about a map and just let it do the sorting? that actually might be quicker
