News for hackers. Stuff that matters.
Re:Rust is now overall faster than C in benchmarks by jstimpfle on Monday January 04, 2021 @10:10PM (#25641607)
I love qsort! It's easy to use.

When I once tested std::sort against qsort (sorting 4-byte integer) I measure a 2x difference. So yes, definitely non-trivial, but it won't get much worse than that.

Have you ever seen a program that was slow because of a slow sorting routine?

If you ever need a fast sort (~ never) then the last thing you should do is use std::sort anyway. You should figure out what your data looks like and hand roll an implementation. For example, a radix sort is often possible to use, easy to implement, and much faster than std::sort.

There are no comments on this comment yet.