qsort(cables,ncables, sizeof(Cable*), comparator);
The current sort takes approximately .2 seconds. I'm trying to make it so i can sort it in under .1 seconds.
cables is of type **Cable, ncables is the number of elements in cables.
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.
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.