Welcome to Sorting visualiser!
How to select a sorting algorithm?
The Programmer must be aware of several interrelated and often conflicting efficiency
considerations to make
an intelligent choice about:
which sorting algorithm is the most appropriate to a particular problem.
What factors must be taken into consideration?
- The amount of machine time necessary for running the program.
- The amount of space necessary for the program.
- The length of time that must be spent by the programmer in coding the sort.
Choice of a competant programmer:
If a file is small, sophisticated sorting techniques designed to minimise the space and time are usually worse or only marginally better in efficiencies than simpler, generally less-efficient methods.
In many programming applications it is often necessary to sacrifice efficiency for clarity, with sorting this is usually opposite. Once, sorting program is written and tested, the programmer's chief goal must be to improve speed even if it becomes less readable.
Sounds good but how?
- To optimise any one: Time complexity or space complexity.
- A good idea is to remove fuction calls specially from the innner loops and replace with inline code.