Analysis of the proposed algorithm
Generally, the running time of a sorting algorithm is proportional to
the number of comparisons that the algorithm uses, to the number
of times items are moved or exchanged, or both (Robert, 1998).
The approach used in this paper is to measure the number of
comparisons and exchanges carried out by each algorithm
(Batcher’s Sort, Bitonic Sort and Oyelami’s Sort) in the worst case
scenario.
RESULTS AND DISCUSSION
Table 1 shows the result obtained. From the results in
Table 1, the proposed algorithm has fewer numbers of
comparisons and swaps compared with both Batcher’s
Odd-Even Sort and Bitonic Sort. The results also show
that as the size of the input increases, the proposed
algorithm tends to be more efficient as both Batcher’s
Odd-Even and Bitonic sorts are not good for large values
of input. The implication of these is that the proposed
algorithm is faster and therefore, more efficient. The algorithm
is also recommended for large values of inputs to
be sorted.