2 ms·
Generally, performance isn't interesting in cases where asymptotic running time isn't dominant. You could sort 3 items with a couple of `if` statements, which w
by baddox 16y ago
Generally, performance isn't interesting in cases where asymptotic running time isn't dominant. You could sort 3 items with a couple of `if` statements, which would compile to a handful of microprocessor instructions. That's not interesting. Surely, in any data structure or algorithms course offered as part of a CS degree, the sorting assignments are for the "general sorting" problem. This implies relatively large data sets (and unpredictable, since you don't expect to be able to use a faster non-comparison sorting algorithm).