If you're using C++, your first step should be switching to
std::sort(), which is usually faster (although probably not by a factor of two).
Second step, use a profiler.
Last edited on
I would, but i'm required to use qsort for the program i'm writing. I need to sort 499500 cables by cost(an element of the class) in less than .1 secs.