Skip to main content

Quick sort is considered to be quicker because the coefficient is smaller that any other known algorithm. There is no reason or profproof for that, just no algorithm with a smaller coefficient has been found. Its true that other algorithms also have O(nn log nn) time, but in the real world the coefficient is important also.

Note that for small data insertion sort (the one that is considered O(n^2n2) ) is quicker because of the nature of the mathematical functions. This depends on the specific coefficients that vary from machine to machine. (At the end, only assembly is really running.)
  So sometimes a hybrid of quick sort and insertion sort is the quickest in practice I think).

Quick sort is considered to be quicker because the coefficient is smaller that any other known algorithm. There is no reason or prof for that, just no algorithm with a smaller coefficient has been found. Its true that other algorithms also have O(n log n) time, but in the real world the coefficient is important also.

Note that for small data insertion sort (the one that is considered O(n^2) ) is quicker because of the nature of the mathematical functions. This depends on the specific coefficients that vary from machine to machine. (At the end only assembly is really running)
  So sometimes a hybrid of quick sort and insertion sort is the quickest think)

Quick sort is considered to be quicker because the coefficient is smaller that any other known algorithm. There is no reason or proof for that, just no algorithm with a smaller coefficient has been found. Its true that other algorithms also have O(n log n) time, but in the real world the coefficient is important also.

Note that for small data insertion sort (the one that is considered O(n2) ) is quicker because of the nature of the mathematical functions. This depends on the specific coefficients that vary from machine to machine. (At the end, only assembly is really running.) So sometimes a hybrid of quick sort and insertion sort is the quickest in practice I think.

Source Link
Ramzi Kahil
  • 1.1k
  • 1
  • 10
  • 20

Quick sort is considered to be quicker because the coefficient is smaller that any other known algorithm. There is no reason or prof for that, just no algorithm with a smaller coefficient has been found. Its true that other algorithms also have O(n log n) time, but in the real world the coefficient is important also.

Note that for small data insertion sort (the one that is considered O(n^2) ) is quicker because of the nature of the mathematical functions. This depends on the specific coefficients that vary from machine to machine. (At the end only assembly is really running)
So sometimes a hybrid of quick sort and insertion sort is the quickest think)