It's just a generic sorting function. If you need more you're supposed to write it yourself. The C standard library exists for convenience not performance.