5 ms·
I double checked and it's indeed faster, up to 3x faster if the data is partially sorted. It uses O(n) aux memory so if std::sort were to use this it would sti
by nedoka 6y ago
I double checked and it's indeed faster, up to 3x faster if the data is partially sorted.
It uses O(n) aux memory so if std::sort were to use this it would still need IntroSort as a fallback, but that's pretty much a non-issue since std::stablesort already does the same.
- richardwhiuk 6y agoHow can stablesort use IntroSort if IntroSort is non-stable?
- jsnell 6y agoThey mean that std::stable_sort already needs an extra memory buffer, and falls back to a different algorithm if that can't be allocated.