4 ms·
> If every major language provides an O(n log n) sort function, is it still a leaky abstraction? Yes, if the performance is still not acceptable and you look i
by fizixer 10y ago
> If every major language provides an O(n log n) sort function, is it still a leaky abstraction?
Yes, if the performance is still not acceptable and you look into the problem and discover that your scenario could benefit from radix sort, or one of partial sorting, or some kind of intermittent sorting, all of which would require investigating the specific case at a "white box" level, ignoring the existence of a black-box O(n-log-n) sort API call.
- quelltext 10y agoThe implementation is a black box but the performance characteristics could very well be part of the API contract. When you require and it's feasible to use radix sort you probably know not to use the standard sort function.
- smallnamespace 10y agoYes, but reasoning about the API contract is exactly what being taught sorting algorithms helps you navigate, just like learning the guts of backprop helps the ML practitioner understand why things can go wrong.