3 ms·
There are trade-offs. Can you use extra memory, or do you require an in-place sort? Does your data even fit in ram, or will you be continually reading from an
by mooism2 13y ago
There are trade-offs.
Can you use extra memory, or do you require an in-place sort?
Does your data even fit in ram, or will you be continually reading from and writing to disk? (Alternatively: does your data fit in L1 cache, or will you be continually reading from and writing to slower parts of memory?)
Do you need a stable sort? It'll be slower.
Do you want the sort that's faster on average? Or the one that has the fastest worst case?