The std::stable_sort is a slower version of std::sort that additionally provides stability, i.e. equivalent elements maintain their relative positions.
This is important, notably for interactive cases when one range can be repeatedly sorted based on different aspects.
Compiler Explorer link: https://compiler-explorer.com/z/jEsW9Gzsf
@simontoth Making unstable sort the default is one thing that C++ got right and Rust got wrong.