If you're interested in these types of implementation/optimization details, Andrei Alexandrescu gave a great talk at this year's CppCon about practical sorting, e.g. when to break out of quicksort to something else:
https://www.youtube.com/watch?v=FJJTYQYB1JQ