4 ms·
In his benchmark, the author is assuming that qsort() is implemented using quicksort, but that's not necessarily true. For example, glibc is using mergesort (al
by xeeeeeeeeeeenu 7y ago
In his benchmark, the author is assuming that qsort() is implemented using quicksort, but that's not necessarily true. For example, glibc is using mergesort (although it falls back to quicksort if the system is short on memory).
- hinkley 7y agoI can’t imagine the sort of bugs you get when your code relies on stable sort but calls qsort and everything works great until the machine is under heavy load.
- Sean1708 7y agoThe most annoying part of development, your users can and will rely on any observable behaviours of your software.
- hinkley 7y agoSomeone recently did something very stupid/clever with an API that I wrote. In the code review I initially complained, but then I couldn’t think of any other way to interpret the design. So I guess that’s a feature now. ‘Course later we found a performance problem, but, you know…