Thanks for the help and input. I think you are right that there may not be much of a time difference between the two and that sort is just going to have to take as long as it takes. Since my data...
Type: Posts; User: Polystyrene
Thanks for the help and input. I think you are right that there may not be much of a time difference between the two and that sort is just going to have to take as long as it takes. Since my data...
The list needs to be sorted after each set of new data is added to the list, so it is already sorting right before the sorted data is needed. If unsorted data is used, I would have to go through the...
Ok so I tried using the lower_bound function to find the iterator where it should be inserted as whiteflags suggested. However, the program becomes very slow and according to the profiler I am...
To clarify, it is an STL list of data structures. Think of it like this, list<struct> myList. And I do use a typical comparison function in order to compare two structures when using sort.
I thought about just putting it into position immediately, but I would still have to find where to put it using a comparison function. Should that method be faster?
I have a program that relies on a sorted list of data structures. During program execution the list is initially sorted using list::sort however I continually need to add new unsorted data...