# How to known which algorithm is the best for what situation, when sorting numbers?

Is there some kind of “universal list” of performance of different algorithms in different situations?

I have different databases that save user input (numbers). However some of these sets of numbers are small and some of them are really big (such as the common one). There are negative numbers included.

I remember from when I took algorithms as a course that there are things such as “big-oh notation” and “theta notation”, etc. What I am looking for is some way of looking up which algorithm I should use for different un-ordered lists of numbers.

I know that merge sort has the best over all performance with a worst-case time of $$n log n$$ however I also know that both insertion sort and quick sort (worst-case $$n^2$$) sorts better with fewer elements in the given list. There are a few cases of lists being in reverse sort, where can I look up what is the most effective then?

How do I know which of insertion sort or quick sort I should use then?

What is “a small list of numbers that is quicker to sort with quick sort/insertion sort”?