3 ms·
I'm guessing that even though std::sort calls compare slightly more, it'll be faster, since the compiler has available the sort function, the comparison functio
by mort96 4y ago
I'm guessing that even though std::sort calls compare slightly more, it'll be faster, since the compiler has available the sort function, the comparison function and the types. In C, the call to qsort is just a normal function call; and likewise, from within qsort, the call to the compare function is just a normal function call, and the indexing operations have to use the size value that's only known at runtime.