Simple, but fast, sort of doubles in std::vector

Hi,

I am currently working on a "statistics" library, and, for some things I hope to do in it, I need to sort an std::vector<double> by the size/"magnitude" of the doubles in that vector.

Is there any sorting algorithm in the c++ standard library?

If not, what other FAST sorting algorithms can I use for this?

If no one has ANYTHING, I can also implement this myself, but, I am hoping to use some kind of "standardized" sorting algorithm, that is already "out there".

Thanks!

C :)
Last edited on
Answer:

std::sort should work!
std::sort is the fastest, but merge sort is the fastest basic sorting algorithm to my knowledge.
Topic archived. No new replies allowed.