6.1.1 allsorts.ex

Comparison of different sorting algorithms.

6.1.1.1 Notes

The slower sorts will be omitted after a while.

Bucket sort looks really good, but remember that the other sorts are generic, and can handle integers, floating-point numbers, strings, etc. Bucket sort can only sort integers, and the integers need to be in a reasonably small, well-defined range, as is the case in this benchmark. It also uses more memory than some of the other sorts.

6.1.1.2 quick_sort

include allsorts.ex
global function quick_sort(sequence x)

6.1.1.3 hybrid_sort

include allsorts.ex
global function hybrid_sort(sequence x)

6.1.1.4 great_sort

include allsorts.ex
global function great_sort(sequence a)

6.1.1.5 merge_sort

include allsorts.ex
global function merge_sort(sequence x)